/}/ is a valid regular expression in JS:
alert('}}}'.replace(/}/g, "!"))
However, the ECMA standard doesn’t seem to allow that:
PatternCharacter ::SourceCharacter but not any of:
^ $ \ . * + ? ( ) [ ] { } |
Why does the above work? Is this feature universally supported? Is it documented anywhere?
http://www.regular-expressions.info/characters.html :
Seems that javascript is not an exception.