News for hackers. Stuff that matters.
Re:Stop avoiding regular expressions damn it by 3minus1 on Sunday May 12, 2013 @09:32AM (#5694153)
What's a good resource for learning reg exp?
Re:Stop avoiding regular expressions damn it by bradt on Sunday May 12, 2013 @09:41AM (#5694170)
Great question. I learned them through osmosis over many years of looking at them in other people's code and tinkering myself. I don't remember ever going through a tutorial or reading a book. Probably not the best way to learn them as it definitely took a long time to have a good grip on them and I was missing important pieces for a long time. For example, it was only relatively recently that I learned that you can turn off "greedy" when using .* by adding a ? after it.
Re:Stop avoiding regular expressions damn it by solistice on Sunday May 12, 2013 @09:51AM (#5694199)
How about this site? http://www.regular-expressions.info/ I just skimmed it, and I'm not a regex pro, so I can't vouch for it's quality, but it seems like a place to start. For C#, I kinda enjoyed the dotnetperls page on regex http://www.dotnetperls.com/regex.
Re:Stop avoiding regular expressions damn it by tekacs on Sunday May 12, 2013 @09:45AM (#5694180)
http://www.regular-expressions.info/ is something I've stumbled across a few times in recent years, recommended by my friends to one another.

If I recall correctly I learnt the basics from MSDN documentation and later more thoroughly when I first came across Perl. Either of these are pretty decent choices, too. :)

Re:Stop avoiding regular expressions damn it by arkitaip on Sunday May 12, 2013 @09:56AM (#5694215)
I find picking an actual context is really important to keep you motivated as learning about regexps can be tedious and prone to error. Probably the most fun regexp work I've done has been with Apache's mod_rewrite - using .htaccess files of course - because it's a great feeling to master something that useful that previously just seemed like magic.
Re:Stop avoiding regular expressions damn it by zimbatm on Sunday May 12, 2013 @09:51AM (#5694201)
What you want is to achieve a level where you can start thinking in regexp.

Eg: /^([a-z]*)$/ this translates into my brain to: a string that starts with a capture group of 0-N characters between a-z and also ends with it.

Then it's really easy.

Re:Stop avoiding regular expressions damn it by beezee on Sunday May 12, 2013 @09:59AM (#5694226)
this one is incomplete but gave me a really good foundation that makes it easy to fill in gaps when I need, and most importantly gets you that "thinking in regex" result mentioned above- http://regex.learncodethehardway.org/book/