开发者

jquery validation with regular expression

I want to validate a field which will allow only "xxxx"[not " " or "xxxx"" or somthing else] with regula开发者_如何学Gor expression in Jquery validator ,so what the regular expression would be...plzz suggest.


A general regex you should match would be -

^"[x]+"$

(I assume you only want character 'x' as you defined in question and x does not mean 'any character' )

Edit: As per your comment here is the modified regex you should be using -

^"[^"]+"$
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜