From: Rich Kilmer Date: 2002-09-08T06:19:14+09:00 Subject: RE: Regular expression question sorry for answering my own question...just found /\Adec(?![a-zA-Z0-9_])/ -rich > -----Original Message----- > From: Rich Kilmer [mailto:rich@infoether.com] > Sent: Saturday, September 07, 2002 5:15 PM > To: ruby-talk ML > Subject: Regular expression question > > > As I don't have my copy of Mastering Regular Expressions at > home, and I'm not that good with them (yet :-) I question for > the RegEx gurus: > > if I want to match "dec" at the beginning of a string how would I do > that: > > /\Adec/ > > matches on string "decimal" and "dec" basically I want 'dec' > not followed by [A-Za-z0-9_-] but anything else is ok > (including 'dec' being the entire string) > > Thanks in advance > > -rich > > > >