Boost logo

Boost Users :

From: Edward Diener (eddielee_at_[hidden])
Date: 2002-09-09 06:54:16


"John Maddock" <john_maddock_at_[hidden]> wrote in message
news:00c301c257f1$7f873f20$e65587d9_at_1016031671...
> > Call to the
regex_match(chkString,Match,Expression,match_not_dot_newline)
> causes program go into an infinite loop when
> >chkString="http://localhost/ideas/exchange/June98/test/test.cfm" and
> Expression="^/(.*)*.cfm"
> > Both Regex++ and test program are compiled with VC7.0 on WindowsXP. I
have
> tried to play with optimisation settings, but this >bug appears even in
> debug configuration. I understand that syntax of regular expression is
> incorrect, but library should rise error in >this case. I hope that I'm
> doing something wrong and there is a workaround to this problem.
>
> anything that contains (.*)* is going to get pathological: it's the
classic
> test case that breaks all backtracking regex implementations. I hope that
a
> future version will detect and throw and exception when something like
this
> is used.

The "(.*)*" is strange ( zero or more of any character, except newline in
the case above, repeated zero or more times ) but is shouldn't cause an
infinite loop if that is what it is acrually doing. If it does, I think it
needs to be fixed in a future release.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net