Re: Regex help needed

2013-01-09 Thread Dr.Ruud
On 2013-01-08 13:28, punit jain wrote: { test = ("test123"); test = ("test123","abc"); test = ("test123","abc","xyz"); } { test1 = ("passfile"); test1 = ("passfile","pasfile1"); test1 = ("passfile","pasfile1","user"); } and so on The requirement is to have the file parsing so that final o

Re: Regex help needed

2013-01-09 Thread *Shaji Kalidasan*
Punit Jain, This is not the optimized code but you can refactor it. This works for the given scenario, no matter the order of input data. Hope it helps to some extent. [code] my $var = ''; my @args = (); my %hash; while () { chomp; my ($var,$arg) = split /=/,$_,2; if($var eq '{') { @args = ();

Re: Regex help needed

2013-01-08 Thread timothy adigun
Hi punit jain, Please check my comments below. On Tue, Jan 8, 2013 at 1:28 PM, punit jain wrote: > Hi , > > I have a file as below : - > > { > test = ("test123"); > test = ("test123","abc"); > test = ("test123","abc","xyz"); > } > { > test1 = ("passfile"); > test1 = ("passfile","pasfile1"); > t

Re: Regex help needed

2013-01-08 Thread Jim Gibson
On Jan 8, 2013, at 4:28 AM, punit jain wrote: > Hi , > > I have a file as below : - > > { > test = ("test123"); > test = ("test123","abc"); > test = ("test123","abc","xyz"); > } > { > test1 = ("passfile"); > test1 = ("passfile","pasfile1"); > test1 = ("passfile","pasfile1","user"); > } > > and

Re: regex help needed

2006-09-28 Thread Jay Savage
On 9/27/06, Owen <[EMAIL PROTECTED]> wrote: On Wed, 27 Sep 2006 13:11:17 -0600 "Gerald Wheeler" <[EMAIL PROTECTED]> wrote: > I am looking for: ab1in line1 > and looking for: ab2 in line 2 > > actually ab1 and ab2 immediately follow the last "/" (there are > numerous "/" on the line (w/o

Re: regex help needed

2006-09-27 Thread Owen
On Wed, 27 Sep 2006 13:11:17 -0600 "Gerald Wheeler" <[EMAIL PROTECTED]> wrote: > I am looking for: ab1in line1 > and looking for: ab2 in line 2 > > actually ab1 and ab2 immediately follow the last "/" (there are > numerous "/" on the line (w/o quotes)) > > These are not working. can som