Page 1 of 1

regex restrictions :(

Posted: Sun Jun 28, 2015 10:54 pm
by nikolas1612
tried to insert the followning greedy-perl construction:
(.*? OR ){32}
(the idea is to place a certain piece of text after the 32nd "OR")
It has to work but it supprisingly doesn't !!

For some reason the maximum number is 30!!

Error 2015-06-28 15:44:41 The recursion and backtracking limit has been exceeded. Rewrite the pattern [(.*? OR ){32}] so it fails earlier

I understand that's made for faster operation. I also admit the formula could be much more perfect.
Yet it seems to be a kind of excessive care about the user.

I tried to look for the list of such restrictions in the manual but failed.
It seems that it is not documented at all ! That's really confusing.
So I propose to make a separate list of these restrictions, and allow them to be changed by the user.

Re: regex restrictions :(

Posted: Tue Jul 07, 2015 3:40 pm
by DataMystic Support
It is documented - look for atomic grouping and possessive quantifiers.

A better pattern is

((?>.*?) OR ){32}