用于检查输入字符串的正则表达式只是波斯语 [英] Regex for check the input string is just in persian language
本文介绍了用于检查输入字符串的正则表达式只是波斯语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 MVC,我是新来的.我想通过 [RegularExpression]
验证仅检查输入值是否为波斯语(字符).所以我想使用 Regex 并需要检查 unicodes 的范围,但我不知道如何找到波斯字符 Unicode 的范围.我对这个正则表达式正确吗?您的建议是什么,我如何才能找到波斯语中的 Unicode 范围
I work with MVC and I am new on it. I want to check input values is only in Persian language (Characters) by [RegularExpression]
Validation.
So I think to use Regex and need to check in range of unicodes, but I don't lnow how can find range of Persian characters Unicode. Am I right about this Regex? what is your suggestion and how can I find range of Unicode in Persian
推荐答案
检查波斯语中的首字母和末字母范围 我认为是这样的:
Check first letter and last letter range in Persian I think something like this:
"^[آ-ی]$"
这篇关于用于检查输入字符串的正则表达式只是波斯语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文