PHP function preg_match is not functioning precisley -


i use preg_match_all() function count number of words.

what have found out removes numbers content. why? here function:

define("word_count_mask", "/\\p{l}[\\p{l}\\p{mn}\\p{pd}'\\x{2019}]*/u"); $matches;     function str_word_count_utf8($str)     {                 global $matches;         return preg_match_all(word_count_mask, $str, $matches);           }  

what think causing issue??


Comments

Popular posts from this blog

python - matpltolib navigation toolbar edit curves and parameters line color automatically changes issue -

node.js - Nodejs javascript implementation of PBEWithMD5AndTripleDES/CBC/PKCS5Padding -