Performance Tuning Regular Expressions in JavaScript
Doug D started a thread on the google groups jQuery developer list about a faster trim method he ran across and how counter intuitively it was better to run two expressions rather than one. Matt Kruse then provided a link to a great article on the subject: http://blog.stevenlevithan.com/archives/faster-trim-javascript
The origional thread can be found here (I couldn’t find it at the time of the writing but I’m sure it’s there!): http://www.nabble.com/forum/Search.jtp?forum=20161&local=y&query=faster+trim
Update! Karl Swedberg brought this up a while back:
http://groups.google.com/group/jquery-dev/browse_thread/thread/1eba9d253a617574/7d401086db415557?lnk=gst