Re: Regex pattern match in perl

2008-12-14 Thread John W. Krahn
explor wrote: Hi Gurus, Hello, I am new to perl and need some help to learn regex in perl. From the below line i need to extract following: Part I 1) $ENVFROM = dapi...@testhost.com 2) $ENVTO1 = te...@etc.com 3) $ENVTO2 = te...@etc.com 4) $ENVTO3 = samt...@abc.com line=EnvFrom: dapi...@tes

Re: Regex pattern match in perl

2008-12-14 Thread Chas. Owens
On Sat, Dec 13, 2008 at 19:35, explor wrote: > Hi Gurus, > I am new to perl and need some help to learn regex in perl. From the > below line i need to extract following: > > Part I > 1) $ENVFROM = dapi...@testhost.com > 2) $ENVTO1 = te...@etc.com > 3) $ENVTO2 = te...@etc.com > 4) $ENVTO3 = samt...

Re: Regex Pattern

2003-08-14 Thread Jeff 'japhy' Pinyan
On Aug 7, Trevor Morrison said: >I am trying to use regex to extract the city,state and zip out of a file. >Now, the problem is the city can have more then one word to it like > >San Antonio >San Francisco > >I have also, bumped into case of 4 or 5 words in the city name! I am >looking for a rege

Re: Regex Pattern

2003-08-14 Thread Freddo
Hello Trevor, On Friday 08 August 2003 00:04, Trevor Morrison wrote: > HI, > > I am trying to use regex to extract the city,state and zip out of a file. > Now, the problem is the city can have more then one word to it like > ... > I have also, bumped into case of 4 or 5 words in the city name!

Re: Regex Pattern

2003-08-14 Thread Janek Schleicher
Jeff 'Japhy' Pinyan wrote at Thu, 07 Aug 2003 20:19:22 -0400: > my ($city, $state, $zip) = $line =~ /^(.*) ([A-Z]{2}) (\d{5,9})$/; > > This assumes the fields are separated by a space. It also only checks for > AT LEAST 4 and AT MOST 9 digits, so it would let a 7-digit zip code > through. If

RE: Regex Pattern

2003-08-09 Thread Jeff 'japhy' Pinyan
On Aug 8, Trevor Morrison said: >Thanks for taking the time to look over my problem. In the end, I did end >up using your idea on the map ( scalar reverse). It worked like a champ! Glad it worked for you -- I hoped the whole reversing thing wasn't going to be too esoteric, but it's surprising h

Re: Regex Pattern

2003-08-08 Thread david
Trevor Morrison wrote: > HI, > > I am trying to use regex to extract the city,state and zip out of a file. > Now, the problem is the city can have more then one word to it like > > San Antonio > > San Francisco > > etc, > > I have also, bumped into case of 4 or 5 words in the city name! I am

RE: Regex Pattern

2003-08-08 Thread Trevor Morrison
03 6:19 PM To: Trevor Morrison Cc: [EMAIL PROTECTED] Subject: Re: Regex Pattern On Aug 7, Trevor Morrison said: >I am trying to use regex to extract the city,state and zip out of a file. >Now, the problem is the city can have more then one word to it like > >San Antonio >San Francis