RE: Why wont my REGEX match..

2001-07-16 Thread mark crowe (JIC)
s Mark C > -Original Message- > From: Hamish Whittal [mailto:[EMAIL PROTECTED]] > Sent: 16 July 2001 13:48 > To: [EMAIL PROTECTED] > Subject: Re: Why wont my REGEX match.. > > > Hi All, > > > > I have the following lines from a config

Re: Why wont my REGEX match..

2001-07-16 Thread Abdulaziz Ghuloum
Hello, The substitution s/ //g will effectively reset the reference variables $1 $2, So, moving the line ($value = $2) up eleminates the problem. if ( $_ =~ /\{(.*)\}\s+(.*)/ ) { $dev = 1; $opt = lc($1); $value = $2; $opt =~ s/ //g; } Hope this helps,,, Aziz,,, In article <[

Re: Why wont my REGEX match..

2001-07-16 Thread Hamish Whittal
Hi All, > > I have the following lines from a config file I am trying to read: > {wellfleet ASN} .1.3.6.1.4.1.18.3 > (agentType) .1.3.6.1.4.1.18.3.3.1.11 > (chassisType) .1.3.6.1.4.1.18.3.1.1.1 > > > > My code is: >

Re: Why wont my REGEX match..

2001-07-11 Thread Eduard Grinvald
al Message - From: Akshay Arora <[EMAIL PROTECTED]> Date: Wednesday, July 11, 2001 11:39 am Subject: Re: Why wont my REGEX match.. > There is nothing in $2, because every time you do a RegExp, all of > thosevariables get initialized. > > You do a $opt =~ s/ //g; before yo

Re: Why wont my REGEX match..

2001-07-11 Thread Akshay Arora
There is nothing in $2, because every time you do a RegExp, all of those variables get initialized. You do a $opt =~ s/ //g; before you request $2 do the $value = $2 before that line, and you will be fine. -Akshay Hamish Whittal wrote: > > Hi All, > > I have the following lines from a config

Re: Why wont my REGEX match..

2001-07-11 Thread Brett W. McCoy
On Wed, 11 Jul 2001, Hamish Whittal wrote: > I have the following lines from a config file I am trying to read: > {wellfleet ASN} .1.3.6.1.4.1.18.3 > (agentType) .1.3.6.1.4.1.18.3.3.1.11 > (chassisType) .1.3.6.1.4.1.18.3.1.1.1 > > My code is

Why wont my REGEX match..

2001-07-11 Thread Hamish Whittal
Hi All, I have the following lines from a config file I am trying to read: {wellfleet ASN} .1.3.6.1.4.1.18.3 (agentType) .1.3.6.1.4.1.18.3.3.1.11 (chassisType) .1.3.6.1.4.1.18.3.1.1.1 My code is: if ( $_ =~ /\{(.*)\}\s+(.*)/ ) {