Alexandru Popescu wrote:
> I have a string in the following form: 2006%2F10%2Fasdfasdf (or more
> generic: any_characters+%2Fany_characters+%2Frest_of_it). I am
> wondering if I can retrieve the groups 2006, 10, asdfasdf thru a regex

String#split would be easier than using a regex in this case:

irb(main):001:0> '2006%2F10%2Fasdfasdf'.split('%2F')
=> ["2006", "10", "asdfasdf"]

-- 
Posted via http://www.ruby-forum.com/.