in reply to Verifying number input
use Regexp::Common; while (<>) { /$RE{num}{real}/ and print q{a number\n}; /$RE{quoted}/ and print q{a ['"`] quoted string\ +n}; /$RE{delimited}{-delim=>'/'}/ and print q{a /.../ sequence\n}; /$RE{balanced}{-parens=>'()'}/ and print q{balanced parentheses\n +}; /$RE{profanity}/ and print q{a #*@%-ing word\n}; }
In addition to this, Regexp::Common allows the specification and matching of {real} and {int} numbers, numbers of differing base and those separated into groups by a specified separator.
Definitely worth a look at ... TheDamian++
perl -e 's&&rob@cowsnet.com.au&&&split/[@.]/&&s&.com.&_&&&print'
|
|---|