chalex in Rochester is doing 7 things including…

learn regular expressions


 

chalex has written 4 entries about this goal

Regex::Common 2 years ago

Check out CPAN for the Perl module called Regex::Common. It has pre-built regexes for many common things so that you don’t have to bang your head against the wall.

http://search.cpan.org/dist/Regexp-Common/

e.g: # we require that $replacement be JUST a valid IP address
die “Invalid IP address provided: [$replacement]”
unless $replacement =~ m/^$RE{net}{IPv4}$/;



another excellent site 3 years ago

http://www.wilsonmar.com/1regex.htm

There are a lot of good examples, like matching IP addresses and MAC addresses.



Regex Library 3 years ago

I found a website listing a large number of common regex patterns:

regexlib



guide and example 3 years ago

First, I read this guide.

Next, here’s an example to puzzle over:

sentence.gsub( /\([-\w]+\)/, ’’ )

This example will find the literal parens characters with one or more words in between and replace them with nothing.



 

I want to:

The world wants to...

43 Things Login