note 43343 added to function.eregi-replace
| From: | furiousgreencloud at yahoo dot com | Date: | Fri, 18 Jun 2004 00:47:11 +0000 |
| Subject: | note 43343 added to function.eregi-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-71272@lists.php.net to get a copy of this message | ||
To simply convert wild input into a sensable sting, say for a filename I use:
function cleanString($wild) {
return ereg_replace("[^[:alnum:]+]","",$wild);
}
echo cleanString("@#$&*$@#H~e'{}l{}l<o\{}"); // outputs: Hello
----
Manual Page -- http://www.php.net/manual/en/function.eregi-replace.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43343
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43343&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43343&report=yes
Search -- http://master.php.net/manage/user-notes.php