PDA

View Full Version : where to learn regex



hecato
October 25th, 2007, 11:02 PM
OK, people. Where to learn regex that I dont need to read another tutorial. From time to time, I find myself doing little things with regex (in one langauge or other like: grep, PHP (time ago) and so on).

One time I solve my problem searching mainly for similar things or asking what I do wrong, I forget again of regex until I find me again solving something related.

Thus the question is, which one place you recommend for me don't go back and fort, and learn the "dam thing" now?.

Lang of your choice (I'm not restricted to one or other language), tips, hints, tricks, suguestions? welcome.

LaRoza
October 25th, 2007, 11:30 PM
OK, people. Where to learn regex that I dont need to read another tutorial. From time to time, I find myself doing little things with regex (in one langauge or other like: grep, PHP (time ago) and so on).

Thus the question is, which one place you recommend for me don't go back and fort, and learn the "dam thing" now?.

Lang of your choice (I'm not restricted to one or other language), tips, hints, tricks, suguestions? welcome.

No tutorial? That makes a recommendation tough.

I would browse:

http://www.regular-expressions.info/

stylishpants
October 25th, 2007, 11:33 PM
My number 1 reference is the "perlre" man page.

For education rather than reference purposes, the book "Mastering Regular Expressions" is a classic. IIRC the camel book ("Programming Perl") has a good introduction to regular expressions as well.

scorp123
October 25th, 2007, 11:37 PM
There are good books on this topic. I'd recommend to buy one of them from this list here: http://www.amazon.com/s/ref=nb_ss_gw/103-5157234-8269430?initialSearch=1&url=search-alias%3Daps&field-keywords=regular+expression&Go.x=0&Go.y=0&Go=Go

I personally have the "Mastering Regular Expressions" and I find it's quite useful. Details e.g. here:
http://www.amazon.com/Mastering-Regular-Expressions-Jeffrey-Friedl/dp/0596528124/ref=pd_bbs_sr_1/105-7086686-9287608?ie=UTF8&s=books&qid=1193351718&sr=8-1

hecato
October 25th, 2007, 11:38 PM
No tutorial? That makes a recommendation tough.

I mean with "I dont need to read another tutorial" that after reading the material (tut, man page, reference, book, ...) I have learned enough for not read another material.

LaRoza
October 25th, 2007, 11:41 PM
I mean with "I dont need to read another tutorial" that after reading the material (tut, man page, reference, book, ...) I have learned enough for not read another material.

Ah, I see. You are looking for a more complete reference. That site might be useful, as will the book "Mastering Regular Expression", but as a single reference the site might be more useful.

Fbot1
October 25th, 2007, 11:41 PM
http://www.ilovejackdaniels.com/cheat-sheets/regular-expressions-cheat-sheet/

Compyx
October 26th, 2007, 01:22 AM
I mean with "I dont need to read another tutorial" that after reading the material (tut, man page, reference, book, ...) I have learned enough for not read another material.

As others have already mentioned: "Mastering Regular Expressions" by Jeffrey Friedl. An excellent book, so comprehensive, it'll make your head spin ;)

bashologist
October 26th, 2007, 01:28 AM
I read "o'reilly learning perl", and thought it was a good introduction to perl. The book also recommends "Mastering Regular Expressions". Read something about perl regex then that will help a lot for grep, sed, etc.

hecato
October 26th, 2007, 03:20 AM
Hi people, I have also installed kiki and kudos (from the Ubuntu repos), they have helped me also, which other you recommend?

Also a python oriented: http://www.amk.ca/python/howto/regex/