[PHP] removing backslashes using regular expressions

2001-05-08 Thread Trond Straume

Hi!

I'm having problems using preg_replace to search and remove backslash
character.

print preg_replace(/\\/,,testing \\ testing);

This regexp produces this warning:
No ending delimiter '/' found in c:\internweb\html\preg.php on line 27

It seems like I'm escaping the ending delimineter '/', but if i try to
remove one'\' I'm still escaping. What do I have to do, to make this right?

--
Regards
Trond Straume



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] removing backslashes using regular expressions

2001-05-08 Thread Wico de Leeuw

At 11:27 8-5-2001 +0200, Trond Straume wrote:
Hi!

I'm having problems using preg_replace to search and remove backslash
character.

print preg_replace(/\\/,,testing \\ testing);

try

print preg_replace('\',,testing \\ testing);

double-quote single-quote back-slash single-qoute double-qoute,

Greetz,

Wico


This regexp produces this warning:
No ending delimiter '/' found in c:\internweb\html\preg.php on line 27

It seems like I'm escaping the ending delimineter '/', but if i try to
remove one'\' I'm still escaping. What do I have to do, to make this right?

--
Regards
Trond Straume



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] removing backslashes using regular expressions

2001-05-08 Thread Wico de Leeuw

At 11:45 8-5-2001 +0200, Wico de Leeuw wrote:
At 11:27 8-5-2001 +0200, Trond Straume wrote:
Hi!

I'm having problems using preg_replace to search and remove backslash
character.

print preg_replace(/\\/,,testing \\ testing);

try

print preg_replace('\',,testing \\ testing);

double-quote single-quote back-slash single-qoute double-qoute,

Hmmm not very awake yet i think :)
should be of course:

single-quote double-quote  back-slash double-qoute single-qoute

i typed it but didn't wrote it :)


Greetz,

Wico


This regexp produces this warning:
No ending delimiter '/' found in c:\internweb\html\preg.php on line 27

It seems like I'm escaping the ending delimineter '/', but if i try to
remove one'\' I'm still escaping. What do I have to do, to make this right?

--
Regards
Trond Straume



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]