I haven't thought about the double escapes. And it does makes it harder to read. But I like the array of RegExp idea. In this case I cut it at the first level "|", since with that cut it makes it easier to read. If it works, the same idea could be applied to the Inline Color Editor.