Of course, I've written a few pretty stupid lines:
On Tuesday, 26 June 2001 23:05, Patrik Beno wrote:
> I found out that compiling following regexp:
> ^.{1,32}$
> is very slow. I've thought I have a bug in my code, later on I've
> thought regexp 1.2 is buggy and is cycling somewhere in endless loop.
Bla-bla.
Compilation of the expression is - of course - quick.
What is slow is evaluation in specific situation:
if string's length is exceeding upper limit (32 or whatever above ~20).
Try demo (org.apache.regexp.REDemo). Enter the regexp
and then string to match: after typing last character that makes
string non-matching, re.match() lasts tooooo long.
Sorry for mystification.
+--- ---+
patrik.beno@{qbizm.com|inmail.sk} ICQ#98931498
+- -+
Patrik Beno Qbizm Technologies, Inc.
analyst / developer ... the art of Internet.
+--------------------------------------------------------------------+
Kralovopolska 139 tel: +420 5 4124 2414
601 12 Brno, CZ http://www.qbizm.com fax: +420 5 4121 2696