Project

General

Profile

Bug #4088 » rx.rb

test script which produced the output above - rklemme (Robert Klemme), 11/25/2010 05:40 PM

 

str = %w{ac aac Aac aAc AAc}
i = 1

[
/(?<!a)c/i,
/(?<!a|b)c/i,
/(?<!aa)c/i,
/(?<!aa|b)c/i,
/(?<!b|aa)c/i,
/(?<!aa|bb)c/i,
].each do |rx|
str.each do |s|
printf "%2d %-15p %-5p %p\n", i, rx, s, s.scan(rx)
i += 1
end
end
(1-1/4)