From: Chris Gernon Date: 2006-10-27T23:39:12+09:00 Subject: Re: a regex Alexandru Popescu wrote: > Thanks for all suggestions, but the requirement is to be done thru > regex only :-). I knew how to do it with split, but I need to do it > with regexps only. How about just: irb(main):001:0> match = '2006%2F10%2Fasdfasdf'.match /^(.*)%2F(.*)%2F(.*)$/ => # irb(main):002:0> match[1] => "2006" irb(main):003:0> match[2] => "10" irb(main):004:0> match[3] => "asdfasdf" -- Posted via http://www.ruby-forum.com/.