Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re (tilly) 1: On XML parsing

by tilly (Archbishop)
on Dec 14, 2000 at 18:03 UTC ( #46614=note: print w/replies, xml ) Need Help??


in reply to On XML parsing

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://46614]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2019-12-08 06:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?