From: botp Date: 2011-02-19T01:46:11+09:00 Subject: Re: Help for extracting text with regexp. On Fri, Feb 18, 2011 at 11:02 PM, John Doe wrote: > foo.bar/somePath/somepage.php?attr=value&theone=64646hs554&other=ddd > What I need is the value of the "theone" attribute. there are many ways. sometimes, we just need to focus on what we need... eg, Hash[* "foo.bar/somePath/somepage.php?attr=value&theone=64646hs554&other=ddd".scan(/(\w+)=(\w+)/).flatten] #=> {"attr"=>"value", "theone"=>"64646hs554", "other"=>"ddd"} best regards -botp