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 -
^"[^"]+"$
精彩评论