Sai*_*akR 2 php regex arabic phpbb3
我想知道以下的等价物,但仅限阿拉伯字母:
$regex = '[A-Za-z0-9-[\]_+ ]+'
Run Code Online (Sandbox Code Playgroud)
我试过了:
$regex = '[?-?0-9 ]+';
Run Code Online (Sandbox Code Playgroud)
其中第一个阿拉伯字母?和最后一个字母?.但是,我有以下错误:
[phpBB Debug] PHP Warning:
in file [ROOT]/includes/functions_user.php on line 1505: preg_match():
Compilation failed: range out of order in character class at offset 6
Run Code Online (Sandbox Code Playgroud)
您可以检查您的正则表达口味是否支持\p{Arabic}或\p{InArabic}
尝试:
$regex = '[\p{Arabic}\d-\[\]_+ ]+'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2102 次 |
| 最近记录: |