From: Joel VanderWerf Date: 2006-01-17T14:05:14+09:00 Subject: Re: Question about regular expression Simon Strandgaard wrote: > On 1/17/06, Eric Luo wrote: >> I need to hack out an regular expression, which will match "SNPB" without >> matching "STR SNPB". >> Since ruby 1.8.2 or 1.8.4 don't support the lookbehind feature. what's the >> workable regular expression >> for ruby version 1.8.2? > > tests = %w{SNPB STR\ SNPB} > re = /(? tests.map{|t| t.match(re) } > > #=> [#, nil] > > > ruby 1.8.2 (2004-11-03) [powerpc-darwin7.5.0] > > > -- > Simon Strandgaard > Simon, do you have oniguruma installed? This is what I get: $ ruby -v -e '/(?