14,953
edits
mNo edit summary |
m (→尋找中文、非英文的文字) |
||
| Line 377: | Line 377: | ||
尋找欄位值包含中文字,中文字包含繁體中文與簡體中文,不包含特殊符號,例如 Emoji:{{kbd | key = ⭐}}。 | 尋找欄位值包含中文字,中文字包含繁體中文與簡體中文,不包含特殊符號,例如 Emoji:{{kbd | key = ⭐}}。 | ||
PHP: | PHP: ([http://sandbox.onlinephpfunctions.com/code/ca7dd83ae0950353e617950349898a6165b1d865 online demo] hosted by [http://sandbox.onlinephpfunctions.com/ PHP Sandbox]) | ||
<pre> | <pre> | ||
// approach 1 | // approach 1 | ||
| Line 394: | Line 394: | ||
</pre> | </pre> | ||
技術問題除錯: | 技術問題除錯: 錯誤訊息 | ||
<pre>preg_match(): Compilation failed: character value in \x{} or \o{} is too large at offset 8</pre> | |||
解決方式: [http://php.net/manual/en/function.preg-match.php preg_match()] 需要加上 {{kbd | key = u }} 變數<ref>[https://stackoverflow.com/questions/32375531/preg-match-compilation-failed-character-value-in-x-or-o-is-too-large-a php - preg_match(): Compilation failed: character value in \x{} or \o{} is too large at offset 27 on line number 25 - Stack Overflow]</ref>。 | 解決方式: [http://php.net/manual/en/function.preg-match.php preg_match()] 需要加上 {{kbd | key = u }} 變數<ref>[https://stackoverflow.com/questions/32375531/preg-match-compilation-failed-character-value-in-x-or-o-is-too-large-a php - preg_match(): Compilation failed: character value in \x{} or \o{} is too large at offset 27 on line number 25 - Stack Overflow]</ref>。 | ||