[Answered ]-Django, MySQL and regex: not supporting re syntax?

2👍

You need to use the MySQL REGEXP syntax for the expression:

^[^[:space:]]+/[0-9]+/[^[:space:]]+$

where

  • ^ – start of string
  • [^[:space:]]+ – 1 or more characters other than whitespace
  • / – a / symbol
  • [0-9]+ – 1 or more digits
  • / – a /
  • [^[:space:]]+ – 1 or more characters other than whitespace
  • $ – end of string.

More details on REGEXP syntax

Leave a comment