preg_replace problem - please help

preg_replace problem - please help

am 19.10.2007 09:35:09 von halinacierniak

Hello!

I would like to use preg_replace function to leave in the result variable
only:
1) letters from A to Z
including Polish letters like ±¶¼³óñê
including Polish upper letters like ¡¦¬£ÓÑÊ
2) letters []()-_=+!@#$%^&*`~',/\|.

I have for example such varaible

$text_test="M±¿ lubi czytaæ ksi±¿ki";

1) How to prevent from Russian letters? Does preg_replace help me to do so?

I have tried to do
preg_replace ("[^a-zA-Z0-9±¶¼³óñê-_\.]+",$xxxxx,$text_test)
but I think it is too poor.

2) what should I put in variable $xxxxx, because I don`t know what the
string is to replace for

Please help me
Marcin

Re: preg_replace problem - please help

am 19.10.2007 10:37:55 von Captain Paralytic

On 19 Oct, 08:35, "K." wrote:
> 2) what should I put in variable $xxxxx, because I don`t know what the
> string is to replace for

It is up to you. If you want to remove all trace of them, use '' (the
empty string)