Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: This looks like someone sneezed and hit the keyboard

by MCS (Monk)
on Feb 03, 2004 at 16:51 UTC ( [id://326244]=note: print w/replies, xml ) Need Help??


in reply to This looks like someone sneezed and hit the keyboard

While it can be very intimidating because you don't know what it means, it's really not that hard to read. I would suggest the book "mastering regular expressions" by Jeffrey Friedl. It helped me make sense of what was once gibberish. Others have already explained what it does so I won't go over that again but I don't think regular expressions should be feared. A read through "Mastering Regular Expressions" should make a master out of anyone.

I also want to say that I disagree with the notion that you should always use /x to make your code clearer. If you do, you are relying on what the comments say, not on what the regex says. To me, when you spread it out like that, it makes it easier to comment but harder to actually read and find errors. (in my opinion) I think it's all the whitespace around the regex that makes it harder for me to understand. I agree most code is under commented but /x tends to lead to overcommenting for people who don't really understand regex's.

ps. I have no affiliation with the author or the publishers other than I bought the book and loved it

  • Comment on Re: This looks like someone sneezed and hit the keyboard

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (8)
As of 2024-06-14 12:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.