From: dblack@... Date: 2006-10-27T22:27:44+09:00 Subject: Re: a regex Hi -- On Fri, 27 Oct 2006, Alexandru Popescu wrote: > Hi! > > 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 > (I confess I couldn't figure it out so far :-( ). Try this: str.split("%2F") to get all the other stuff in an array. David -- David A. Black | dblack@wobblini.net Author of "Ruby for Rails" [1] | Ruby/Rails training & consultancy [3] DABlog (DAB's Weblog) [2] | Co-director, Ruby Central, Inc. [4] [1] http://www.manning.com/black | [3] http://www.rubypowerandlight.com [2] http://dablog.rubypal.com | [4] http://www.rubycentral.org