My pattern works fine in VI. Back slash before (,) and | is needed to assign special meaning to them. > -----Original Message----- > From: Shannon Fang [mailto:xrfang / hotmail.com] > Sent: Tuesday, December 03, 2002 6:22 PM > To: ruby-talk ML > Subject: Re: Regular expression question > > > > > > line !~ /\(^#\)\|\(^[\s\t]*$\)/ > > I think you just need to use ( not \(, I suppose it should be > > line !~ /^#|^\s*$/ > > if you don't need to reference I think no () is needed. And \s should > include whitespace and \t? I replaced already it to \S so the pattern now is \(^#\)|\(^\S*$\) Nevertheless it doesn't work yet:-) > > Shannon > > _________________________________________________________________ > Protect your PC - get McAfee.com VirusScan Online > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > >