验证通配符和一些符号 [英] validation for wild characters and some symbols
本文介绍了验证通配符和一些符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在我的文本框中进行验证
仅允许使用某些符号,例如#()-_&+
I want validation in my textbox
Only some of the symbols like # ( ) - _ & + should be allowed
推荐答案
您可以尝试使用此正则表达式
You can try this regular expression
/^[ A-Za-z0-9_()#&+-]*
/
希望对您有所帮助.
Hope this will help you..
您可以使用Snehasih提供的正则表达式来验证TextBox中输入的字符.您也可以通过引用此线程来尝试类似的操作.
http://www.vbforums.com/showthread.php?570438-Restrict-TextBox-to-only-certain-characters-numeric-or-symbolic [
You can use Regular Expression as given by Snehasih to validate the Entered characters in the TextBox. You can also try something like this by referring this thread.
http://www.vbforums.com/showthread.php?570438-Restrict-TextBox-to-only-certain-characters-numeric-or-symbolic[^]
这篇关于验证通配符和一些符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文