From: Navindra Umanee Date: 2005-01-30T01:15:53+09:00 Subject: Re: string extraction Martin S. Weber wrote: > string[%r|/(\d+)/+$|, 1] ? Exactly what I was looking for, thanks. The zero-width positive lookahead is also interesting. str[regexp, fixnum] Is there a similar way to combine and use different matched groups instead of being restricted to a fixnum? Say instead of just \1 you had a match for \1 and \2 and you wanted the output string to be \2 \1 "byru"[/(by)(ru)/, \2\1] should output "ruby". Thanks, Navin.