正则表达式只包含数字,格式化为8位前面的零,然后验证 [英] regular expression to contain only numbers, format to value 8 digits with preceding zeros, and then validate
本文介绍了正则表达式只包含数字,格式化为8位前面的零,然后验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
正则表达式只包含数字,格式化为8位前面的零,然后验证
regular expression to contain only numbers, format to value 8 digits with preceding zeros, and then validate
推荐答案
嗨Reshmi,
这是你的正则表达式^ [0 +] [0-9] {7}
Hi Reshmi,
Here is the regex for you^[0+][0-9]{7}
注意:在输入中有一个或多个0。
接受的输入:
00045678
02345678
00000123
输入无效:
12345678
423adad2
34 @#
Note:Preceding with one or more 0's in the input.
Accepted input:
00045678
02345678
00000123
Invalid input:
12345678
423adad2
34@#
we4
您可以在这里测试您的价值[ ^ ]
希望这对你有所帮助。
问候,
RK
we4
You can test your value in here[^]
Hope this helps you a bit.
Regards,
RK
这篇关于正则表达式只包含数字,格式化为8位前面的零,然后验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文