note 104731 added to function.preg-replace
| From: | sjoerd dot linders at osu1 dot php dot net | Date: | Mon, 04 Jul 2011 10:36:56 +0000 |
| Subject: | note 104731 added to function.preg-replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181218@lists.php.net to get a copy of this message | ||
If u want to clean a string to pure ascii[0-126] use the following regulare expression:
<?php
$AsciiData = preg_replace( '/[\x7f-\xff]/', '', $DurtyData );
?>
----
Server IP: 69.147.83.197
Probable Submitter: 83.161.219.197
----
Manual Page -- http://www.php.net/manual/en/function.preg-replace.php
Edit -- https://master.php.net/note/edit/104731
Del: integrated -- https://master.php.net/note/delete/104731/integrated
Del: useless -- https://master.php.net/note/delete/104731/useless
Del: bad code -- https://master.php.net/note/delete/104731/bad+code
Del: spam -- https://master.php.net/note/delete/104731/spam
Del: non-english -- https://master.php.net/note/delete/104731/non-english
Del: in docs -- https://master.php.net/note/delete/104731/in+docs
Del: other reasons-- https://master.php.net/note/delete/104731
Reject -- https://master.php.net/note/reject/104731
Search -- https://master.php.net/manage/user-notes.php