in reply to Regular expression seems to be greedy

This is a good example of why one should not attack HTML or XML code with regexes but rather use some of the more sophisticated parsing modules on CPAN!

And to boot, it is not even valid HTML: ex nihilo fit nihil as the Elder said.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

  • Comment on Re: Regular expression seems to be greedy

Replies are listed 'Best First'.
Re^2: Regular expression seems to be greedy
by Cody Pendant (Prior) on Nov 10, 2004 at 00:19 UTC
    And to boot, it is not even valid HTML

    I think that's just another aspect of the same problem. Having got into trouble by attacking HTML with a regex...



    ($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
    =~y~b-v~a-z~s; print