On Mar 4, Jeff 'japhy' Pinyan said:

>And then you'll want to remove the extraneous information.
>
>  ($city, $state) = $addr =~ /\s*([^,]+),\s*([A-Z]{2})/;

I left the first comma out of my regex.

  ($city, $state) = $addr =~ /,\s*([^,]+),\s*([A-Z]{2})/;

>>__DATA__
>>Tomy Savage:408-724-0140:1222 Oxbow Court,
>>Sunnyvale,CA 94087:5/19/66:34200
>>Lesle Kerstin:408-456-1234:4 Harvard Square, Boston,
>>MA 02133:4/22/62:52600

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to