对字符编码、单词和内容样式的分析可以轻松而明确地判断出文本数据属于哪种语言。
Analysis of character encoding, words, and content style can easily determine with high confidence which language textual data is in.
使用函数preg_grep可以非常轻松地处理列表:只需提供模式作为第一个参数,并提供要匹配的单词数组作为第二个参数。
The function, preg_grep , makes processing a list very easy: Simply provide the pattern as the first argument and an array of words to match as the second argument.
由于正则表达式将把句点处理为单个字符,因此我们可以轻松地遍历单词列表以查找匹配。
Since regular expressions treat a period as a single character, we can easily walk the word list, looking for matches.
应用推荐