function make_alphanum($string_val) { return eregi_replace("[^[:alnum:]]", "", $string_val); } strips everything except ALPHA and NUM Chars
Joel "Kenn Murrah" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php