From: saeed ahmed on
hello friends,

I have used

preg_replace('/[^0-9a-zа\~\!\@\$\%\^\*\(\)\;\,\.\'\/\_]/i', ' ',$match);

for remove the special characters. its work fine. but the problem I want to
remove special characters from this kind of sentence

///

#: "'''''Amor''' é fogo que arde sem se ver,''
#: ''é ferida que dói, e não se sente,''
#: ''é um contentamento descontente,''
#: ''é dor que desatina sem doer.''"
#:: ''- Camões''


///

its remove all special character including é, ã, õ, which I do not want to.
I want to remove special character except these three. please suggest me...

-----
Regards
Saeed Ahmed
http://saeed05.wordpress.com
-----
From: Ashley Sheridan on
On Tue, 2010-04-27 at 16:41 +0600, saeed ahmed wrote:

> hello friends,
>
> I have used
>
> preg_replace('/[^0-9a-zа\~\!\@\$\%\^\*\(\)\;\,\.\'\/\_]/i', ' ',$match);
>
> for remove the special characters. its work fine. but the problem I want to
> remove special characters from this kind of sentence
>
> ///
>
> #: "'''''Amor''' é fogo que arde sem se ver,''
> #: ''é ferida que dói, e não se sente,''
> #: ''é um contentamento descontente,''
> #: ''é dor que desatina sem doer.''"
> #:: ''- Camões''
>
>
> ///
>
> its remove all special character including é, ã, õ, which I do not want to.
> I want to remove special character except these three. please suggest me....
>
> -----
> Regards
> Saeed Ahmed
> http://saeed05.wordpress.com
> -----


Add those characters inside the square brackets. In regular expressions,
[^] indicates a list of characters that *won't* be matched.

Thanks,
Ash
http://www.ashleysheridan.co.uk