regex restrictions :(

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
nikolas1612
Posts: 22
Joined: Tue May 12, 2015 3:57 am

regex restrictions :(

Post 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.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: regex restrictions :(

Post by DataMystic Support »

It is documented - look for atomic grouping and possessive quantifiers.

A better pattern is

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