From: El Gato Date: 2007-01-31T05:25:34+09:00 Subject: Regexp captures I find myself doing something like this a lot lately: # where result is most often the textual output of a %x{command} (c = result.match(/id: (\d+)/)) ? c.captures.first : result.scan(/error: (.*)/).to_s Is there a smoother/better way to say this? -- Posted via http://www.ruby-forum.com/.