Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Parse mailing addresses with a regex

by data67 (Monk)
on Jun 23, 2003 at 14:07 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2021-03-04 03:54 GMT
Find Nodes?
    Voting Booth?
    My favorite kind of desktop background is:

    Results (98 votes). Check out past polls.