Open venki-kratos opened 9 years ago
Probably you should consider support for /i - like below - change of syntax
"eqStringRough": function(left, right) { /* if the right ends with /i it is a case insensitive match */ var flag = "g" , pat = right; if(pat && (pat.length > 2) && (pat.substring(pat.length-2) == "/i")) { pat = pat.substring(0, pat.length-2); flag = "gi"; } return (left.match(new RegExp(pat, flag))); },
Down-side is what if "/i" is the intended search string? How does escaping work in JSON Xpath style query syntax?
thanks, again
Looks like this is still not fixed in the latest master branch. Would you consider this extention to your beautiful API. thanks, Venki
How does it work? "=~" operator does not seem to handle "/i" convention for javascript regular expressions. Great API. thanks. Looking forward to using it seriously.