RE: Regex query Thanks!

2001-10-30 Thread Girish \(Skyscape\)
001 6:52 PM > To: Girish (Skyscape) > Cc: [EMAIL PROTECTED] > Subject: Re: Regex query > > > On Oct 25, Girish (Skyscape) said: > > >%Replacements = ( > > ";s(\d)", "$1" > > ,";b(\d)", "$1" > >);

Re: Regex query

2001-10-25 Thread Jeff 'japhy' Pinyan
On Oct 25, Girish (Skyscape) said: >%Replacements = ( >";s(\d)", "$1" > ,";b(\d)", "$1" >); Your problem is that these double-quoted strings get interpolated right here. "\d" is "d", and "$1" is whatever the value of $1 is at the time. You'll need to take a more involvi

Re: Regex query

2001-10-25 Thread pApA_rOACh
irish (Skyscape)" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 25, 2001 11:42 AM Subject: Regex query > Hi All, > > Can this be done ? > > sample string > E=mc;s2 > > should get converted to > E=mc2 > > similarly H;

Regex query

2001-10-24 Thread Girish \(Skyscape\)
Hi All, Can this be done ? sample string E=mc;s2 should get converted to E=mc2 similarly H;b2O should get converted to H2O for this I use following code %Replacements = ( ";s(\d)", "$1" ,";b(\d)", "$1" ); $inputstr = "E=mc;s2"; foreach $x (keys %Replacements) {