note 97952 added to function.mb-ereg
| From: | arash at hemmat dot biz | Date: | Tue, 18 May 2010 09:32:54 +0000 |
| Subject: | note 97952 added to function.mb-ereg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169344@lists.php.net to get a copy of this message | ||
I could easily remove any non Persian (Farsi) characters using this function, the range for Arabic
and Persian are shared so this code could be used for Arabic too.
<?php mb_ereg_replace("[^Ø-Û¿]","-",$string); ?>
This is the reference for finding the character range of Unicode languages:
http://unicode.org/charts/
----
Server IP: 79.132.192.3
Probable Submitter: 94.182.83.71
----
Manual Page -- http://www.php.net/manual/en/function.mb-ereg.php
Edit -- https://master.php.net/note/edit/97952
Del: integrated -- https://master.php.net/note/delete/97952/integrated
Del: useless -- https://master.php.net/note/delete/97952/useless
Del: bad code -- https://master.php.net/note/delete/97952/bad+code
Del: spam -- https://master.php.net/note/delete/97952/spam
Del: non-english -- https://master.php.net/note/delete/97952/non-english
Del: in docs -- https://master.php.net/note/delete/97952/in+docs
Del: other reasons-- https://master.php.net/note/delete/97952
Reject -- https://master.php.net/note/reject/97952
Search -- https://master.php.net/manage/user-notes.php