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

2002-02-20 Thread John Ericson
Im having a weird regexp problem in PHP that I think is correct but it doesnt appear to work. The code is this: $a = /test/; preg_replace(/^\//, , $a); echo $a; I want preg_replace to replace the first '/' in $a with '' so that the echo function echoes test/,

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

2002-02-20 Thread James Taylor
try: $a = preg_replace(/^\//, , $a); On Wednesday 20 February 2002 12:25 pm, you 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 = /test/; preg_replace(/^\//, , $a); echo $a; I want

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

2002-02-20 Thread Darren Gamble
Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -Original Message- From: John Ericson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 20, 2002 1:25 PM To: [EMAIL PROTECTED] Subject: [PHP] preg_replace(/^\//.. doesnt work? Im having