in reply to Re: regex match after pattern
in thread regex match after pattern

I've got just shy of four million reasons why a proper parser should be used for this purpose. But the inquisitive engineer in me wants to know: Under what conditions (not including fear of modules) might one justify not using the proper parser procedure?

Replies are listed 'Best First'.
Re^3: regex match after pattern
by choroba (Cardinal) on Mar 12, 2015 at 16:08 UTC
    I'd use the regex approach if the input in question was generated from a known template that would never change, which means all the whitespace would always be in the sampe place. Or in a one-time script I'll never run again. Which makes it almost never. :-)
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^3: regex match after pattern
by Anonymous Monk on Mar 12, 2015 at 22:59 UTC

    Under what conditions (not including fear of modules) might one justify not using the proper parser procedure?

    When you know how to write and debug the regular expression yourself ;) and understand the risks