I need something like this :
Regex validSelector = new Regex("^[.#a-zA-Z0-9_:[] ]+[,><a-zA-Z0-9_~=\"\":[] ]*$");
Has anybody written a regular expression for validating jQuery or CSS selectors? (CSS3/jQuery1.4)
Or, does anybody know where I can find a regex or regex generator to validate a jQuery selector?(or atleast CSS selectors?)
I've tried going through the code of sizzle.js bu John Resig and the w3c docs for css (http://www.w3.org/Style/CSS/) but ended up havin a headache :(
Thought i'd rather ask if any of you has already written or used some snippet for this.
Thanks!!