3 ms·
JQuery Regular Expressions Review
- jeresig 16y agoThis was originally posted to the jQuery forum: http://forum.jquery.com/topic/jquery-regular-expression-review http://forum.jquery.com/topic/jquery-regular-expression-revi... The changes have already been made: http://github.com/jquery/jquery/commit/9dc6e0c572b9c809a3a4c123071d96d48a01dd1c http://github.com/jquery/jquery/commit/9dc6e0c572b9c809a3a4c...
- Malic 16y agoThings move FAST on the Internet! :) (Go figure!)
- Robin_Message 16y agoShouldn't the last one (offset.js:210-rscript), by the same logic given for core.js:023-quickExpr (although you do say there it is negligible), be /^(?:body$|html$)/i instead of /^(?:body|html)$/i
- mthoms 16y agoIf the goal is speed, I'm not sure I'd use the case-insensitive modifier for tag names. However, this does make jQuery more compatible with (older/poorly written/auto generated) HTML which is probably an overall benefit for most use cases.