#3951 closed enhancement (invalid)
New /= regex filter
Reported by: | shazam | Owned by: | john |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | selector | Version: | 1.4.3 |
Keywords: | regex filter | Cc: | |
Blocked by: | Blocking: |
Description
A regex attribute filter that might be very useful for xml data search. Done with little ATTR: match and filter update.
Diff attached.
Attachments (1)
Change History (9)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
This new feature doesn't break any test and supports almost all regexp.
I did plenty of tests and it seems that only expressions like :
$('input[name/=/foo
[bar\]/]')
trying to match <input name="foo[bar]"/>
doesn't work properly around the escaped
[
comment:3 Changed 14 years ago by
After some more testing it appears that the problem is on expressions containing an opened
[ that is not closed. for example :
$('input[name/=/f
w{2}
[
w*
]/i]') works because it contains
] which avoid a chunk/match error (not found where it is buggy yet)
$('input[name/=/f
w{2}
[
w*/i]') doesn't work...
I'm trying to find a fix for this.
comment:4 Changed 14 years ago by
Ok managed to make it work properly but i had to change the chunker regex.
I tested many regex including special chars - [](){}. - escaped or not backreferences.... everything works properly and more it does not break any test in the test suite.
Diff attached.
Changed 14 years ago by
Attachment: | regex selector.diff added |
---|
comment:5 Changed 13 years ago by
Since Sizzle now uses querySelectorAll, any enhancement that introduces non-standard selector syntax is likely to throw warnings in the console. It happens for pseudos like :hidden
and seems to be a concern when people see it, so I'd be wary of introducing features like this.
comment:6 Changed 12 years ago by
Keywords: | needsreview added |
---|---|
Milestone: | 1.3.1 |
Priority: | minor → low |
Version: | 1.3 → 1.4.3 |
Bikeshed/feature creep
comment:7 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
In order to use native querySelectorAll in more cases, we need to avoid non-standard extensions to the CSS query syntax.
comment:8 Changed 12 years ago by
Keywords: | needsreview removed |
---|
Sample :
$('book[author/=/moli[èe]re/i]') will match every book written by Moliere or Molière ignoring case.