From: "Peña, Botp" Date: 2007-02-22T12:29:37+09:00 Subject: Re: Regex group without capture From: S. Robert James [mailto:srobertjames@gmail.com] : # Is there a way to make a regex group without capturing the group (in # Perl I believe it's possible, can't find any docs how to do this in # Ruby) same, preprend "?:" , like (?:), where will not be captured irb(main):006:0> "this is a test".scan /(this).*(test)/ => [["this", "test"]] irb(main):007:0> "this is a test".scan /(this).*(?:test)/ => [["this"]] irb(main):008:0> "this is a test".scan /(?:this).*(test)/ => [["test"]] kind regards -botp