
您可以将空格字符添加到要排除的字符类中。
^[^n ]*$
正则表达式
^ # the beginning of the string [^n ]* # any character except: 'n' (newline), ' ' (0 or more times)$ # before an optional n, and the end of the string
欢迎分享,转载请注明来源:内存溢出

您可以将空格字符添加到要排除的字符类中。
^[^n ]*$
正则表达式
^ # the beginning of the string [^n ]* # any character except: 'n' (newline), ' ' (0 or more times)$ # before an optional n, and the end of the string
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)