$text = "abc,abcd,abcdee"; If $text contains UTF-8 text, you'll have to add the Unicode modifier "u", so that non-latin characters are not misinterpreted as word boundaries: $text = preg_replace('/\babc\b/u', 'ghi', $text);
創作者介紹
創作者 hweily 的頭像
hweily

hweily

hweily 發表在 痞客邦 留言(0) 人氣( 6 )