私は任意の文字列にマッチさせたい Unicodeかどうかに関係なく、正規表現に一致する正規表現ですか?
$string = "<title>نص عربى English text</title>";
$pattern = '/<title>(regex.here)<\/title>/u';
if (preg_match_all($pattern, $string, $matches, PREG_SET_ORDER)) {
print_r($matches);
} else {
echo 'No matches.';
}
タイトルタグの間にリターンが
نص عربى English text
だから '/ i'または'/u'とは何ですか? –