RE: [PHP] Re: Any Ideas

From: Date: Sun, 27 Jan 2002 03:50:14 +0000
Subject: RE: [PHP] Re: Any Ideas
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-82266@lists.php.net to get a copy of this message
Regula $string=preg_replace("/\W/","",$string); \W = "non-word" characters in perl regular expressions. Word characters are 0-9, a-z, A-Z, and "_". To kill _ as well, do: $string=preg_replace("/[_\W]/","",$string); > -----Original Message----- > From: > php-general-return-82239-adhir=govshops.com@lists.php.net > [mailto:php-general-return-82239-adhir=govshops.com@lists.php. net] On Behalf Of qartis > Sent: Saturday, January 26, 2002 3:22 PM > To: php-general@lists.php.net > Subject: [PHP] Re: Any Ideas > > > I'm guessing something along the lines of: > > -- > $string=str_replace("!","",$string); > $string=str_replace("@","",$string); > $string=str_replace("#","",$string); > $string=str_replace("$","",$string); > $string=str_replace("%","",$string); > $string=str_replace("^","",$string); > -- > > etc. > > > "Philip J. Newman" <newmanpj@philipsdomain.com> wrote in > message news:003d01c1a6a5$fa7d60e0$0401a8c0@philip... > Any Ideas how I can remove !@#$%^&*()_+=-';:"/.,<>? > charactors from a > string? > > Philip J. Newman > Philip's Domain - Internet Project. > http://www.philipsdomain.com/ info@philipsdomain.com > Phone: > +64 25 6144012 > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: > php-general-help@lists.php.net To contact the list > administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#82266) next »