> W> The array of arrays it returns does not contain all subpatterns, it only > > W> irb>regex = /"(\\"|[^"])*"/ > ^^^^^^^^^^ > > You have only *one* subpattern in the regexp, this is this subpattern > which is returned. > > Guy Decoux > I understand now. Thanks for the patience. I would propose adding a scan-like method to String that only puts $& in the results array, regardless of subpatterns. This would be a handy addition to the current scan method for nitwits like me. aString="one two three" matches = [] regexp = /(\w)+/ # current scan would return [["e"], ["o"], ["e"]] aString.simpleScan(regexp) # => ["one", "two", "three"] I realize it is not hard to accomplish using a block with the current String#scan, but it's hard for newbies to discover that $& will contain a full match behind the scenes when the method is returning only the subpattern matches. Wayne