From: Nicholas Seckar Date: 2005-04-28T11:03:38+09:00 Subject: Re: Scanning a String On 4/27/05, basi wrote: > Hello, > How do I scan a string for a pattern and process it when found? For > example: > > for all occurrences of two vowel letters in succession, insert the > apostrophe between the vowels. some_string.gsub(/([aeiou])([aeiou])/) {|match| $1 + "'" + $2}