If you can assume that the first 10 digits are the phone number, and the remaining digits are the extension (which is a big assumption):
# Get rid of all non-digits $number =~ s/\D//g; # Break the number into groups of digits my $phone = substr($number,0,10); my $extension = substr($number,10);
buckaduck
In reply to Re: Simple Regex
by buckaduck
in thread Simple Regex
by sevrin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |