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
"John Maddock"
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.