This was too good to not repost… If you have any interest at all in JavaScript performance optimization, then this publication by Jeff Roberson will be of great interest. In this article Jeff dissects RegEx’s found in jQuery and provides insight as well as suggestions to improve them either in performance or syntax. Each example is detailed with the original RegEx, the module it can be found in, the line number it is located at, a suggested revision and a descriptive, explanatory analysis of his revision.
JavaScript: jQuery RegEx Review
Posted by Rick WaldronContact Us
We'd love to hear from you. Get in touch!
P.O. Box 961436
Boston, MA 02196
Comments
We moved off of Disqus for data privacy and consent concerns, and are currently searching for a new commenting tool.
Thanks for the kind words! 8^)
@ridgerunner – thanks for the great read! do you have a twitter account that I can link to in this article as well?
No, other than participating on numerous forums, I don’t do the whole \”social-networking\” thing (yet). For me this would be a big time-hole.
Since I can’t find any other way to contact you, Jeff (having tried for all of 2 minutes…) can I use this forum to thank you?
I’ve just applied your \\b(?: optimisation to my javascript-based test engine and seen a 5x performance boost matching in LARGE strings. Now to get cracking with the rest…
I’m always happy to help out with regex related questions. You can typically find me over on the PHP DevNetwork Regex forum. I check in there on a regular basis.
8^)