use strict; use Number::Phone::US qw(is_valid_number); my $data = <<'EOF'; all your data goes here EOF my @results = ( $data =~ m/ ( # start caption \( # open paranthesis \d{3} # 3 digits \) # close paranthesis \s? # 0 or 1 whitespace \d{3} # 3 digits \- # 1 dash line \d{4} # 4 digits ) # end caption /xg ); foreach ( @results ) { print "valid: $_\n" if is_valid_number( $_ ); }
Sören
In reply to Re: Re: phone number parsing refuses to work
by Happy-the-monk
in thread phone number parsing refuses to work
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |