Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Parse mailing addresses with a regex

by data67 (Monk)
on Jun 23, 2003 at 14:07 UTC ( [id://268165]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    141 Martha Lynn Amblynoster 12345 New Pickle Drive MoreTown PA 98765 6
    +54 555-1212 no detail
    178 Edgar Bimblybum Jr. 23456 Highfiddle Road Acheville Ma 24680 345-7
    +89-1234 no detail
    161 Joyce W. Wogerbung 18 Lily Piffle Lane Middleton PA 34567 610-678-
    +2345 no detail
    188 Alex Shmogle 6543 Bibblyboo St NW Apt B Washington DC 20009 202-98
    +7-6543 no detail
    
  2. or download this
    foreach my $line (@data_file) {
            if ($line =~ m!^(\d+)\s+(([A-Za-z]+\s+[A-Za-z].\s+[A-Za-z]+)|(
    +[A-Za-z]+\s+[A-Za-z]+) )!) {
    ...
            }
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://268165]
Front-paged by broquaint
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 10:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found