From: John Resig Date: Tue, 9 Jan 2007 06:04:54 +0000 (+0000) Subject: Added support for (basic) nested parens and (basic) nested brackets. You can now... X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=aa424984f7c37956f568512aa94bc16787e4c651;p=jquery.git Added support for (basic) nested parens and (basic) nested brackets. You can now do: div:not(.foo[a:not(.even)]) or div[p[a.even]]. --- diff --git a/src/selector/selector.js b/src/selector/selector.js index d9114c2..e21102c 100644 --- a/src/selector/selector.js +++ b/src/selector/selector.js @@ -70,10 +70,10 @@ jQuery.extend({ "\\[ *(@)S *([!*$^=]*) *('?\"?)(.*?)\\4 *\\]", // Match: [div], [div p] - "(\\[)\\s*(.*?)\\s*\\]", + "(\\[)\\s*(.*?(\\[.*?\\])?[^[]*?)\\s*\\]", // Match: :contains('foo') - "(:)S\\(\"?'?([^\\)]*?)\"?'?\\)", + "(:)S\\(\"?'?(.*?(\\(.*?\\))?[^(]*?)\"?'?\\)", // Match: :even, :last-chlid "([:.#]*)S"