Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 sharing their wisdom with the Monastery: (4)
As of 2024-04-19 13:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found