From: Mike Cargal Date: 2009-02-10T09:11:58+09:00 Subject: Re: regexp problem If you're only trying to pull out the single number, this REGEX will work for the whole phrase you provided. One of the things you want to do with a REGEX is to avoid any more detail than is necessary to find what you're looking for. The REGEX does not need to "match" the whole string. On Feb 9, 2009, at 7:49 AM, Joao Silva wrote: > >> m = text.match(/Math\.ceil\(\-(\d+)/) > > I cannot use regexp on this - need regexp on whole this prase > (Traffic left:.....), because document is full of strings > like > this. > -- > Posted via http://www.ruby-forum.com/. >