× Here you can get community support related to ReDJ.

Regular expression not working in the from URL

  • darkhoros
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 9 months ago #6783 by darkhoros
Dear,
I am trying to redirect the following form of urls:

www.example.com/sub1/sub2/this-is-it.htm
www.example.com/sub1/sub2/sub3/this-isssssss-it.htm
www.example.com/sub2/sub3/thissssss-is-it.htm
www.example.com/sub1/sub3/this-is-it.htm


and I am using this regex in the FORM URL

(?<=\/)[^\/]*(?:\.htm)$

But it is not working.
I tested the regex and it match in any regex tester.
Please advice.

Please Log in or Create an account to join the conversation.

More
5 years 9 months ago #6784 by admin
The problem is that you must rely on the MySQL support for regular expressions:

dev.mysql.com/doc/refman/8.0/en/regexp.html#operator_regexp

And lookahead/lookbehind is not supported as far as I know. Try to change the pattern using a syntax supported by MySQL and it should work.

Kind regards
Luigi

Please Log in or Create an account to join the conversation.

Time to create page: 0.114 seconds