From: "Bartosz DziewoƄski" Date: 2012-05-03T04:32:04+09:00 Subject: Re: array of strings - finding letter combinations 2012/5/2 Sebastjan H. : > Ok, thx. Just so I understand correctly, these two lines are just > examples and are not part of the actual code. Since the array of strings > to be searched in is actually strings in the code below. Right? > > Furthermore, when I used the regex as you put it, I got this error: >> duplicates.rb:5: undefined (?...) sequence: /(?<=&)[a-z]/ > > So I changed it to /&[a-z]/ and the error was gone. It looks like you're using an old version of Ruby; this regex won't work on Ruby 1.8 or earlier. > Since the ampersand can also be followed by a capital letter I tried > this: > /&[a-z]i/ - I searched the net for modifiers, but I guess this would > only work on a specific letter? So how to add the possibility of capital > letter in the regex? That would be /&[a-z]/i - note that "i" is outside of "//". -- Matma Rex