Hello,
I am working in a joomla site that uses jumi scripts.
Using the built in site search some articles are being returned because the search term matches something in the Jumi tag and returns the article when it shouldn't be.
I am trying to do a regex replace in MySql, I created a function and it works fine however it doesn't like some of my regex strings.
I get the message:
"repetition-operator operand invalid"
I looked up the error and found a bunch of stuff talking about how MySQL escapes chars and that it treats * and + differently. One fix I saw said to use double backslash but that isn't working.
Does anyone know how to escape this so that MySql's REGEXP will like this?
\{jumi.*?/jumi}
I have tried
\{jumi.\\*?/jumi}
But that doesn't work, I know it is the * because if I remove it I don't get the error but I don't get my match either.
select id, introtext from jos_content where introtext REGEXP "\{jumi.*?/jumi}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^
This will throw the error
I am not too familiar with MySql so any insight would be very welcome.
Thanks in advance.