Re: regex brain-toot

From: Date: Mon, 19 Jun 2006 18:50:02 +0000
Subject: Re: regex brain-toot
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-238312@lists.php.net to get a copy of this message
On Mon, 2006-06-19 at 14:42, John Nichel wrote: > Jay Blanchard wrote: > > I have a field that contains a value in parenthesis', but also contains > > other text, for instance; (it is a legacy app that I am working with, > > and by legacy I am saying pre-1980) > > > > Upper voltage (124.1) > > > > I know that \([0-9]*\) will get me (124.1), but I am totally forgetting > > how to get 124.1 without the parenthesis without trimming ...ack. Swift > > kickage appreciated. > > > \(([0-9]*)\) Jay, You won't match the dot btw: \(([.0-9]*)\) Which is crude since it will match more than one dot :) Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.general (#238312) next »