1 import { whitespace } from "../var/whitespace.js";
2 import { identifier } from "./var/identifier.js";
3 import { attributes } from "./var/attributes.js";
4 import { pseudos } from "./var/pseudos.js";
6 export var filterMatchExpr = {
7 ID: new RegExp( "^#(" + identifier + ")" ),
8 CLASS: new RegExp( "^\\.(" + identifier + ")" ),
9 TAG: new RegExp( "^(" + identifier + "|[*])" ),
10 ATTR: new RegExp( "^" + attributes ),
11 PSEUDO: new RegExp( "^" + pseudos ),
13 "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" +
14 whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" +
15 whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" )