Re: foolprof regex

2006-12-20 Thread beast
Chad Perrin wrote: At a wild guess, I'd say that you're probably getting the matches you want, plus getting the "my name =" as a match. The reason is that you didn't specify that the leading spaces before the word "name" must be at the beginning of the line. For that, use "^". Use "perldoc pe

Re: foolprof regex

2006-12-20 Thread John W. Krahn
beast wrote: > > Hi All, Hello, > Basically I want these input : > name= >name= > name= >name = > > But I did not want these input: > my name = > name is = > my name is = > > -- > > if ( /\s*name\s*=/) { > print "Match: $_"; > } > > did not works as i expected. You n

Re: foolprof regex

2006-12-20 Thread Chad Perrin
On Wed, Dec 20, 2006 at 02:56:28PM +0700, beast wrote: > > Hi All, > > Basically I want these input : > name= >name= > name= >name = > > But I did not want these input: > my name = > name is = > my name is = > > -- > > if ( /\s*name\s*=/) { > print "Match: $_"; > } > >

foolprof regex

2006-12-19 Thread beast
Hi All, Basically I want these input : name= name= name= name = But I did not want these input: my name = name is = my name is = -- if ( /\s*name\s*=/) { print "Match: $_"; } did not works as i expected. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional