Re: Regexp - alternate match and grouping



Paul Lalli wrote:
Why? Why are you feeling the need to make this one massive regexp?
You're matching two completely different formats. It makes no sense
that one regexp should be able to handle both.

Because currently I need to handle only two formats, but it may be more formats in future. Creating new branches IMO makes it harder to maintain and develop further...


--
Witold Rugowski
rugowski_at_nhw_pl
http://nhw.pl/blg/
.



Relevant Pages

  • Re: Regexp - alternate match and grouping
    ... Witold Rugowski wrote: ... You're matching two completely different formats. ... that one regexp should be able to handle both. ... Because currently I need to handle only two formats, but it may be more formats in future. ...
    (comp.lang.perl.misc)
  • Re: Fast NFA engine anyone?
    ... I feel that the time I will have to spend extracting the ... the matching portion and scan it again to extract the parts I want. ... maybe I missed how DFAs could give me ... better than regexp). ...
    (comp.compilers)
  • Fast NFA engine anyone?
    ... check which one matches and, in case, extract substring from the ... matching text for further processing. ... All regexp are anchored (i.e. ... Is there any work done on comparing NFA and DFA when regexp are ...
    (comp.compilers)
  • Re: Filter string to remove non-utf-8 characters
    ... 'The global property tells the RegExp engine to find ALL matching ... 'Our pattern tells us what to find in the string... ... 'Use the replace function of RegExp to clean the username. ...
    (microsoft.public.scripting.vbscript)
  • Re: Filter string to remove non-utf-8 characters
    ... 'The global property tells the RegExp engine to find ALL matching ... 'Our pattern tells us what to find in the string... ... 'Use the replace function of RegExp to clean the username. ...
    (microsoft.public.scripting.vbscript)