[Answer]-Django OperationalError: "Error 'repetition-operator operand invalid' from the regexp"

1👍

MySQL doesn’t understand Perl regexp. You must read MySQL regex and use [[:>:]]. The string '\b' in Python is a backspace.

For regex in Python must be used double backspace '\\b' or “raw” string prefixed with “r” r'\b'.

You should check safe characters in the hashtag. A bad user can otherwise construct a regex that would be analyzed forever (DOS attack).

Leave a comment