buddycloud/buddycloud-webclient — pull request #42 by Schnouki (2012-02-12 17:04:20+00:00)
Title: Enhance regexp for highlighting JIDs and URLs

This makes it more reliable and avoids highlighting things like "(@TwitterID)" or trailing punctuation. Fixes #40.

The new regexp for matching URLs is horrible but documented here: http://daringfireball.net/2010/07/improved_regex_for_matching_urls. I also have a much simpler version in a private branch, but I prefer this one because it can also highlight things like "ur1.ca/84pcp" (short URL without protocol part) and e-mails starting with "mailto:...".