regular expression to detect numbers written as words - UTF-8 input

curtismexico

New Member
thanks for the answers to :"regular expression to detect numbers written as words" :http://stackoverflow.com/questions/3608159/regular-expression-to-detect-numbers-written-as-wordsI now have this working, however I have the same requirement but the numbers as words are in Arabic (or any other UTF-8) and not English, so :\[code\]if (preg_match("/\p{L}\b(?:(?:????|?????|?????|?????|????|???|????|??????|????|???|????)\b\s*?){4}/", $str, $matches) > 0) return true;\[/code\]Does not work - I've googled and there seems to be quite a few issues with preg_match and UTF-8 string but I couldn't get any of the suggestions found to work. Any help much appreciated.
 
Back
Top