From: clc Date: 2006-04-23T21:21:48+09:00 Subject: Scan-like Idiom to Capture a Group as a String Instead of an Array? I've been using these two lines to capture text that only appears once, but the second line bothers me a little. Is there a one-line idiom for this that extracts groups like #scan but returns a string instead of an array so the second line isn't needed? text = string.scan( %r{ skip_this ( keep_this ) skip_this }is ) text = text[ 0 ] Thanks for any help, Chris