i have some problems with my regex:
if (preg_match_all('/{[a-z]+:ce_img:(single|pair)(\s.*)*}/', $files, $matches))
{
echo "ok";
}
For some reason it crashes my site. Ofcourse i already tried to google it and found something about "Catastrophic backtracking" although i'm not sure if this is my problem.
The regex should give me everything between {eggs:ce_img:single(or pair) till the ending }
When i try to change or remove (single|pair) it runs just normally. So it should be something regarding that right?
I'm quite sure that $files isn't the problem.
Does someone know how to solve this?
Regards, Olcan
EDIT: Here an example of how this regex should work: image