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
Good day, The first argument should just be a normal regular expression, not a replacement regular expression. I'm not at my server right now, but I would guess that it'll work once you get rid of the last / in the first expression. Darren Gamble Planner, Regional