Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Parse mailing addresses with a regex

by tos (Deacon)
on Jun 23, 2003 at 15:03 UTC ( #268198=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (my $line = <DATA>) {
            #if ($line =~ m!^(\d+)\s+(([A-Za-z]+\s+[A-Za-z].\s+[A-Za-z]+)|
    +([A-Za-z]+\s+[A-Za-z]+) )!) {
    ...
    178 Edgar Jones Jr. 18013 Highfield Road Ashton Ma 20861 323-774-1339 
    +no detail
    161 Joyce W. Whang 18 Long Point Lane Media PA 19063 610-891-2344 no d
    +etail
    188 Alex Smith 1979 Biltmore St NW Apt B Washington DC 20009 202-913-6
    +685 no detail
    
  2. or download this
    # perl re
    
    ...
    $5: DC 
    $6: 20009 
    $7: 202-913-6685
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://268198]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2021-04-23 07:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?