RegularExpressionValidator

RegularExpressionValidator

本文介绍了如何使正则表达式特殊字符可以接受?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我有一个正则表达式,不接受特殊字符 我也想删除空格字符 PLZ帮助? < asp:RegularExpressionValidator ID = RegularExpressionValidator4 runat = server ErrorMessage = 最少6 charecters ValidationExpression = ^ [a-zA-Z0-9 \ t] {6,20} $ ControlToValidate = txtUsername ForeColor = 红色 ValidationGroup = 1 > < p class = rfv > 最少6个字符< / p > < / asp:RegularExpressionValidator > 解决方案 ControlToValidate = txtUsername ForeColor = 红色 ValidationGroup = 1 > < p class = rfv > 最少6个字符< / p > < / asp:RegularExpressionValidator > 基本上,你想要除空格之外的任何角色,对吧?试试这个: ^ [^ \s] {6,20} i have a regular expression which is not accepting special charactersand i wants remove space charecter tooplz help ?<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ErrorMessage="Minimum 6 charecters" ValidationExpression="^[a-zA-Z0-9\s]{6,20}$" ControlToValidate="txtUsername" ForeColor="Red" ValidationGroup="1"> <p class="rfv">Minimum 6 Characters</p> </asp:RegularExpressionValidator> 解决方案 " ControlToValidate="txtUsername" ForeColor="Red" ValidationGroup="1"> <p class="rfv">Minimum 6 Characters</p> </asp:RegularExpressionValidator>Basically, you want any character except space, right? Try this:^[^\s]{6,20} 这篇关于如何使正则表达式特殊字符可以接受?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 阿里云证书,YYDS!
05-24 02:42