Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Regex, the jungle survival skill

by dasgar (Priest)
on Mar 10, 2016 at 07:09 UTC ( [id://1157261]=note: print w/replies, xml ) Need Help??


in reply to Regex, the jungle survival skill

If you're interested in getting a good reference book on regular expressions in general, you might want to get a copy of Mastering Regular Expressions by Jeffrey Friedl. It may not necessarily be the best place to start learning, but it is a very good reference book to own.

As for how useful regular expressions are, I still remember my reaction to an example from that book. I can't remember all of the details but the example was describing the task of finding double occurrences of words (such as "the the" while ignoring case differences. And it should include cases of last word of one line and first word of the next line being the same. And the task was not just finding these occurrences, but highlighting them and copying those lines into another file. My initial thought was that had to be hundreds of lines of code, but the author said it could be done in something like 5 lines of code. At that time, I just couldn't believe that such a complicated task could be accomplished with very little code. When I read that, I knew that I really needed to learn regular expressions.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found