Re: more on trimming
| From: | CC Zona | Date: | Sat, 17 Feb 2001 09:17:36 +0000 |
| Subject: | Re: more on trimming | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40310@lists.php.net to get a copy of this message | ||
In article <GOEOKMCCNEAEFCEAFMBNMEAOCGAA.scott@furt.com>, scott@furt.com
("..s.c.o.t.t..") wrote:
> PS: if anyone out there is more familiar with PHP/regexps than i am,
> could you please send me an email explaining how to get global
> pattern matching (ala perl's s///g command) in PHP??
> i cannot seem to find any switches for ereg that make it match global
Use the Perl Compatible Regular Expressions (PCRE), like preg_replace. Not
only will you find the syntax very familiar, but the PRCE functions are
also faster than their ereg equivalents.
--
CC