Re: Put text matching regex into array?
| From: | Jason Wong | Date: | Tue, 17 Dec 2002 07:59:55 +0000 |
| Subject: | Re: Put text matching regex into array? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128519@lists.php.net to get a copy of this message | ||
On Tuesday 17 December 2002 09:05, Leif K-Brooks wrote:
> Is there a way to put each part of a string matching a regex into an
> array? Example:
> $string = "-----_-_--- --_-_-- random text here-_";
> $array = regextoarray($string,"[-_]{1,}");
> //Produces array of "-----_-_---","--_-_--","-_"
preg_match()
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
America may be unique in being a country which has leapt from barbarism
to decadence without touching civilization.
-- John O'Hara
*/