Re: New to php3 - pattern matching?
| From: | Sterling Hughes | Date: | Fri, 21 Jul 2000 07:32:49 +0000 |
| Subject: | Re: New to php3 - pattern matching? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-7661@lists.php.net to get a copy of this message | ||
> Hello,
>
> have just installed php3 and mysql etc ... have used perl before
>
> if I have $item which has a "/" in it and I want to remove it - perl
> would be something like $item =~ s/\///;
>
> How about php3?!
>
> Cheers
>
> Geoff
>
$item = preg_replace("/\//", "", $item);
-Sterling