regex restrictions :(

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

regex restrictions :(

Postby nikolas1612 » Sun Jun 28, 2015 10:54 pm

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: 2174
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Re: regex restrictions :(

Postby DataMystic Support » Tue Jul 07, 2015 3:40 pm

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

A better pattern is

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

Simon Carter, - Insulin dose calculator for Type 1 diabetes - 250,000 free software downloads - send huge email attachments

Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: ArtemSeoKrmog and 2 guests