Re: regex brain-toot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux