RE: [PHP-WIN] reg exp
| From: | Scott Hurring | Date: | Fri, 03 May 2002 19:24:30 +0000 |
| Subject: | RE: [PHP-WIN] reg exp | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-13521@lists.php.net to get a copy of this message | ||
Off the top of my head, try something like:
preg_match('/(\d+)/', $var, $matches);
then look what's in $matches.
---
Scott Hurring
Systems Programmer
EAC Corporation
ScottH@eac.com
Voice: 201-462-2149
Fax: 201-288-1515
> -----Original Message-----
> From: Alberto. Sartori [mailto:alberto.sartori@cellnetwork.it]
> Sent: Friday, May 03, 2002 10:37 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] reg exp
>
>
> Hi guys, I need to make a right pattern to extract only
> digits from a string like this:
>
> "Hello 12 28 99 World"
>
> Any idea? I've red lots of docs, but I'm newbie about regexp
> Thanks in advance,
>
> regards, Alb
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>