From: Ryan Davis Date: 2009-03-10T17:14:13+09:00 Subject: Re: Regexp problem On Mar 10, 2009, at 00:17 , Albert Schlef wrote: > I want to extract an "id" parameter from the URL. I use the following > code: > > url = "http://example.com/id=12345" > id = url[ /(?<=id=)(\d+)/ ] > puts id > > But I get a SyntaxError telling me "undefined (?...) sequence". (?:...) not (?<...) but really, /(\d+)/ will suffice for your example. see: see http://www.zenspider.com/Languages/Ruby/QuickRef.html#11