Re: special character problem

From: Date: Tue, 27 Apr 2010 10:50:51 +0000
Subject: Re: special character problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-304644@lists.php.net to get a copy of this message
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

« previous php.general (#304644) next »