× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Good idea.

Interestingly, this works .{0,10}
But this gives an error .{0,11}



-----Original Message-----
From: Hiebert, Chris [mailto:chris.hiebert@xxxxxxxxxxxxxx]
Sent: Thursday, August 01, 2019 2:46 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Regex, look-behind & unbounded

Have you tried to just put bounds on the expression?

For example ".*" becomes ".{0,1000}"
And ".+" becomes ".{1,1000}"


Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Justin Taylor
Sent: Thursday, July 25, 2019 6:59 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Regex, look-behind & unbounded

Regular expressions have this restriction:
"The length of possible strings matched by the look-behind pattern must not be unbounded (no * or + operators.)"
(Table 33. Regular Expression Operators, from "IBM i Version 7.3: Database DB2 for i SQL Reference")

I've bumped into this restriction several times recently. So far I've gotten around it by doing the task in multiple steps. Anyone know a neat trick to get look-behind to work with * or + operators?




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.