Search and Don’t Replace
March 14th, 2008 — JavaScript, Web Development
John Resig has an interesting hack on his website today for rewriting url query parameters in JavaScript. The interesting part of John’s solution is using JavaScript’s replace function to search a string and then perform an operation other than replace. Nice trick to know about.





