joomla/joomla-cms — pull request #1664 by okonomiyaki3000 (2013-08-05 07:23:12+00:00)
Title: Escape all backslashes (even when not explicitly required) 

because some IDEs (SublimeText) get confused.

This regexp is a bit confusing but it's mean to work like this:
Inside the `[]`, the first `\` (PHP string) escapes the second one and the third is literal. So this give us regexp like `/(^|[^\\])D/` in which the first one again (regexp) escapes the second one.

Unfortunately, SublimeText (and maybe other editors) misinterpret the meaning of the third `\`. Of course they are wrong and I don't think it's a great idea to write code to appeal to wrongly behaving editors but I don't think there's any harm in this minor change. What will happen now is that the third `\`, instead of being literal, will escape the fourth one and we will still end up with a regexp like `/(^|[^\\])D/`. So there should be no change to functionality whatsoever.