Perl - Regular expressions

From LXF Wiki

Perl Tutorial part 2

(Original version written by Marco Fioretti for Linux Format magazine issue 70.)


Scared by abstruse Perl operators and regular expressions? Check them again...


In this second leg of our travel in Perldom we'll see how to manipulate the most complex variables, that is arrays and hashes, and then introduce the real black magic of Perl, its regular expressions.

How to ruin your life with Regular Expressions

Perl has probably the most complete regular expression set of any computer language. To see with your eyes how perverse, er, powerful, they can be, check out the longest regular expression ever seen by humans at www.ex-parrot.com/~pdw/Mail-RFC822-Address.html. Rumours are that it validates email addresses, but don't look at it for too long. To write your own instead, the ultimate reference is “Mastering Regular Expressions” by J. Friedl (www.oreilly.com/catalog/regex2/ ).