From: Clement Ow Date: 2008-06-24T16:39:10+09:00 Subject: Regex extracting certain characters Hi everyone, I have 2 path names : C:/Ruby/20080205/2008 C:/Ruby/2008 I need a regular expression which can select just 2008 and utilise the string that contains just 2008 instead of 20080205. I tried using /2008/ but apparently it also picks up strings like 20080205. is there a way to rearrange the regexp such that only 2008 is selected? -- Posted via http://www.ruby-forum.com/.