[PHP] Re: preg_replace(/^\//.. doesnt work?

2002-02-20 Thread Philip Hallstrom
$a = /test/; $a = preg_replace(/^\//, , $a); echo $a; Notice the difference in the second line... On Wed, 20 Feb 2002, John Ericson wrote: Im having a weird regexp problem in PHP that I think is correct but it doesnt appear to work. The code is this: $a =

[PHP] Re: preg_replace(/^\//.. doesnt work?

2002-02-20 Thread John Ericson
thanks! On Feb 20 11:55, Philip Hallstrom wrote: $a = /test/; $a = preg_replace(/^\//, , $a); echo $a; Notice the difference in the second line... On Wed, 20 Feb 2002, John Ericson wrote: Im having a weird regexp problem in PHP that I think is correct but it

RE: [PHP] Re: preg_replace(/^\//.. doesnt work?

2002-02-20 Thread scott
Also note: ^ matches the beginning of the string, so ^\/ will only match a / at the beginning of the string (not the first occurence of /) -Original Message- From: Philip Hallstrom [mailto:[EMAIL PROTECTED]] Subject: [PHP] Re: preg_replace(/^\//.. doesnt work? $a = /test

Re: [PHP] Re: preg_replace(/^\//.. doesnt work?

2002-02-20 Thread James Taylor
PROTECTED]] Subject: [PHP] Re: preg_replace(/^\//.. doesnt work? $a = /test/; $a = preg_replace(/^\//, , $a); echo $a; On Wed, 20 Feb 2002, John Ericson wrote: I want preg_replace to replace the first '/' in $a with '' so that the echo function echoes test

RE: [PHP] Re: preg_replace(/^\//.. doesnt work?

2002-02-20 Thread scott
] 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 /) -- PHP General Mailing