Regular Expression for valid css and/or jQuery selector -


i need :

regex validselector = new regex("^[.#a-za-z0-9_:[] ]+[,><a-za-z0-9_~=\"\":[] ]*$"); 

has written regular expression validating jquery or css selectors? (css3/jquery1.4)

or, know can find regex or regex generator validate jquery selector?(or atleast css selectors?)

i've tried going through code of sizzle.js bu john resig , w3c docs css (http://www.w3.org/style/css/) ended havin headache :(

thought i'd rather ask if of has written or used snippet this.

thanks!!

the specification of css 3 selectors has section grammar of selectors can use build regular expression. start selector , replace each variable production until there no variables left.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -