Re: buggy regexp



And thanks, Robert, removing "+" helps alot, at least, for this input
string. But if I try a longer one, it still takes ages to match it.

Regards
Ilya


Pattern.matches("((<BR>)|([^<>]+))*", "aaaaaaaaaaaaaaaaaaaaaaaa
<BR><Bx>")

What's wrong with the regular expression?

You nest "+" and "*" which can lead to bad backtracking (which you seem
to experience). If you wait long enough you'll see the result.


.



Relevant Pages

  • Re: Beginners Program
    ... It is one of my first programs, ... > # isn't special and doesn't need to be escaped in a double quoted string. ... >> alot more understandable ... > input file things could go wrong. ...
    (comp.lang.perl.misc)
  • Re: DIY COMPONENTS . COM
    ... > Bob needs time to fish :-) ... > Yep its alot of work, and Robert must spend alot of time on that ... > cant exactly import then ship back out to the US ... ... That's what Robert did, and I did to some extant. ...
    (alt.security.alarms)
  • Re: _ecvt, _gcvt and _fcvt problem
    ... The question is...Do you understand what Robert ... >>>But I have problem about conversion double to string. ... >> problem I strongly recommend taking some time to learn about UNICODE. ... >> please indicate which newsgroup and message). ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: User Define Array Data Type - Subscript out of range
    ... Works just DANDY, Robert! ... strDataType As String ... ' Load Array ...
    (microsoft.public.access.modulesdaovba)
  • Re: Special Characters
    ... "Christoph Basedau" wrote in message ... > you have to close the string and then concatenate the next substr. ... it by removing' ... Then you have tiny function calls and the popUp-Function gets ...
    (microsoft.public.scripting.jscript)