The regular expression contains an unclosed bracket expression

Started by dodos26, May 23, 2024, 06:35:52 PM

Previous topic - Next topic

dodos26

When I test in a sql query it works and returns results. But when I use smf it gives an error:
The regular expression contains an unclosed bracket expression
$sql = "SELECT
....
t.num_replies,
CASE
WHEN REGEXP_INSTR(m.body, 'magnet:\\?xt=urn:btih:[^\\[]+') > 0 THEN
SUBSTRING(
m.body,
REGEXP_INSTR(m.body, 'magnet:\\?xt=urn:btih:[^\\[]+'),
REGEXP_INSTR(m.body, '\\[/magnet\\]', REGEXP_INSTR(m.body, 'magnet:\\?xt=urn:btih:[^\\[]+')) + LENGTH('[/magnet]') - REGEXP_INSTR(m.body, 'magnet:\\?xt=urn:btih:[^\\[]+')
)
ELSE ''
END AS magnet,"

...

Aleksi "Lex" Kilpinen

You have gone out of your way to remove the copyright and stop SMF from showing the credits when called, and have been called out on it more than once. I am really getting tired of repeating this: Removing all the copyright and credits is interpreted as you saying you do not want support from us.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Advertisement: