define regex character class for endline match
fix Opal compatibility issues in substitutors