JASM is an assembler/disassembler for JVM bytecode. It provides a nice syntax for writing JVM classes in a bytecode-focused assembly language, and can also disassemble any Java .class file to JASM ...
This is now available natively as RegExp.escape(). You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character ...