MyBB Community Forums

Full Version: This RegEx doesn't work :(
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm currently working on a plugin, which should detect quote mycodes which link to a post. I'm not really good in regular expressions and I was trying yesterday a long time, but couldn't make it work. Could someone please help me? My current RegEx is:

#\[quote='(.*?)' pid='(.*?)' dateline='(.*?)'\](.*?)\[\/quote\]#i

And I also tried the RegEx from the MyCode parser, but it also didn't work.

#\[quote=([\"']|"|)(.*?)(?:\\1)(.*?)(?:[\"']|")?\](.*?)\[/quote\](\r\n?|\n?)#esi

Update: Works Now.
I was going to mention that neither of those look like regexes, but I'm glad you got it working in the end.