Re: Regexp - alternate match and grouping




Witold Rugowski wrote:
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...

As opposed to Frankenstein-ing your one single regular expression even
further? You have an odd view of what kind of code is difficult to
maintain, IMHO.

Paul Lalli

.



Relevant Pages

  • Re: Date format problem
    ... matching actually take place the double numbers date are automatically return ... > International Date Formats in Access ... > Allen Browne - Microsoft MVP. ... rather than allenbrowne at mvps dot org. ...
    (microsoft.public.access.modulesdaovba)
  • Conditional Panel Freezing
    ... I have tables of different formats, and they cover more lines than ... panes regarding which information is in the top line, ... table has its matching top line? ... JFL ...
    (microsoft.public.excel)
  • Re: Regexp - alternate match and grouping
    ... You're matching two completely different formats. ... that one regexp should be able to handle both. ... Witold Rugowski ...
    (comp.lang.perl.misc)
  • Re: how do I read the numbers in a .txt file like this?
    ... pangzi wrote: ... Is there a pattern to the line formats, ... regexp, but that does get a bit messy for scientific notation. ...
    (comp.soft-sys.matlab)