"be consistent" | |
PerlMonks |
Re (tilly) 1: On XML parsingby tilly (Archbishop) |
on Dec 14, 2000 at 18:03 UTC ( [id://46614]=note: print w/replies, xml ) | Need Help?? |
And this brings up a point I make from time to time as well.
Regular expressions are very well suited to finding patterns
in text. They are not suited to general purpose parsing.
Trying to use them for that is hard to write, hard to read,
hard to be confident you got everything, and you run the
risk of exponential failure conditions. They are beautiful for breaking text into tokens, or finding tokens of interest. A good analogy is that REs are a great text-processing hammer. But often you need a screwdriver, and sometimes you are dealing with something fragile. See also related discussion at Why I like functional programming and the CPAN module Parse::RecDescent.
In Section
Meditations
|
|