RE: [PHP] Re: preg_replace("/^\//".. doesnt work?
| From: | scott | Date: | Wed, 20 Feb 2002 20:30:33 +0000 |
| Subject: | RE: [PHP] Re: preg_replace("/^\//".. doesnt work? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85584@lists.php.net to get a copy of this message | ||
that's probably what he meant... but what he
asked for was how to "replace the first '/' in $a"
if you have $a="abc/def", the regex "^/"
will not replace the first "/" in your string,
which was my point :-)
> -----Original Message-----
> From: James Taylor [mailto:jtx@nestllc.com]
> Subject: Re: [PHP] Re: preg_replace("/^\//".. doesnt work?
>
> Err, that's what he wanted
>
> On Wednesday 20 February 2002 12:13 pm, you wrote:
> > Also note:
> >
> > "^" matches the beginning of the string, so "^\/"
> > will only match a "/" at the beginning of the
> > string (not the first occurence of "/")
> >