adobe/brackets — pull request #5929 by SAPlayer (2013-11-10 19:09:36+00:00)
Title: Replace $& with the whole match

Implements the same special replacement patterns as in the [Mozilla Reference](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter).
See this little conversation: https://github.com/adobe/brackets/pull/5840#issuecomment-28124150

Includes Unit tests.