Skip to content
Permalink
Browse files

jquery selector: Replacing {0,1} for ? in a regex.

  • Loading branch information
flesler committed Jan 5, 2009
1 parent b1e1614 commit 2a81c359d5a45ecaf2dcbc736c8fcdb257a72432
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/selector.js
@@ -246,7 +246,7 @@ var Expr = Sizzle.selectors = {
ID: /#((?:[\w\u0128-\uFFFF_-]|\\.)+)/,
CLASS: /\.((?:[\w\u0128-\uFFFF_-]|\\.)+)/,
NAME: /\[name=['"]*((?:[\w\u0128-\uFFFF_-]|\\.)+)['"]*\]/,
ATTR: /\[((?:[\w\u0128-\uFFFF_-]|\\.)+)\s*(?:(\S{0,1}=)\s*(['"]*)(.*?)\3|)\]/,
ATTR: /\[((?:[\w\u0128-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\]/,
TAG: /^((?:[\w\u0128-\uFFFF\*_-]|\\.)+)/,
CHILD: /:(only|nth|last|first)-child\(?(even|odd|[\dn+-]*)\)?/,
POS: /:(nth|eq|gt|lt|first|last|even|odd)\(?(\d*)\)?(?:[^-]|$)/,

0 comments on commit 2a81c35

Please sign in to comment.
You can’t perform that action at this time.