2013-01-21 101 views
0

我有以下幾行代碼。preg_match_all和多種語言

$pattern = '~[a-z0-9]+~'; 
preg_match_all($pattern, "some text from a website", $array); 

這對於連接工作正常 - 英語語言或美國美國Engish,但我怎麼做這項工作的所有其他語言?我已經從html中檢測到chaset和語言。

編輯:我想我必須使用http://php.net/manual/en/regexp.reference.unicode.php - http://www.regular-expressions.info/unicode.html

有誰知道我在使用Unicode正則表達式的任何語言相匹配(A-Z0-9)?

在此先感謝。

回答