Re: need help with parsing form input ...

From: Date: Tue, 11 Mar 2003 18:52:11 +0000
Subject: Re: need help with parsing form input ...
Groups: php.general 
Request: Send a blank email to php-general+get-139163@lists.php.net to get a copy of this message
Thanks ... one more thing: is there a way to modify this to allow a period (dot) to included, as well as the alha and num characters? once again, thanks. function make_alphanum($string_val) { return eregi_replace("[^[:alnum:]]", "", $string_val); } strips everything except ALPHA and NUM Chars Joel "Kenn Murrah" <kenn@thebytebusiness.com> wrote in message news:007101c2e7fa$1afcf1a0$2d64a8c0@murrahboy... > Greetings. > > I'm out of my league here, not knowing enough about regular expressions yet > to do this, so I desperately need someone's help ... > > I need to parse form input to eliminate unwanted characters (punctuation, > mostly) ... for instance, if the web site visitor types " smith,susan--33" > into the field, i want to parse that line to eliminate the initial space, > the comma, and the dashes so that $myvariable=smithsusan33" .... > > any help in doing this would be GREATLY appreciate. > > thanks. > >

« previous php.general (#139163) next »