RE: Another Regular expression problem

2003-03-10 Thread Joseph P. Discenza
Electron One wrote, on Monday, March 10, 2003 13:12 : while(<>){ : chomp; : if(/\s*\$[a-z]\w+\s*/i){ : #if(/\b\$[a-z]\w+\b/i){ : print "Matched: $` -- $& -- $' :\n"; : } : else{ :print "No match:$_\n"; : } : } : : testfile.txt###

Re: Another Regular expression problem

2003-03-10 Thread Electron One
At 12:06 PM 3/10/2003 -0800, Ted Zeng wrote: if(/\$\b[a-z]\w+\b/i) should work. If i do this, it will still include this line, I sure hope this doesnt pass alf$f12w32 cuz it shouldnt And I want it to be a word that starts off with the "$" symbol. :-( "\b" only includes those chars in "\w" w

Re: Another Regular expression problem

2003-03-10 Thread Ted Zeng
if(/\$\b[a-z]\w+\b/i) should work. "\b" only includes those chars in "\w" which doesn't include "$". So "$" is not include in the word, only "hello" is included. ted zeng "Stovall, Adrian M." wrote: > > -Original Message- > > From: Electron One [mailto:[EMAIL PROTECTED] > > Sent: Monda

RE: Another Regular expression problem

2003-03-10 Thread Stovall, Adrian M.
> -Original Message- > From: Electron One [mailto:[EMAIL PROTECTED] > Sent: Monday, March 10, 2003 12:12 PM > To: [EMAIL PROTECTED] > Cc: Electron One > Subject: Another Regular expression problem > > > Hello Everyone, > >I have a perl file that has this, > > ##