Something is rotten in the state of Pattern parsing
The parser for patterns seems not quite right; specifically there seems to be a problem with backlashes. Consider this example:
(Pattern.substitute #"\b" "w\b" "\\\\b" -1) ; => throws an error about an unexpected quote
(Pattern.substitute &(Pattern.init "\b") "w\b" "\\\\b" -1) ; => works fine
(This is courtesy of the famous, revered, and all around great guy @TimDeve)
I volunteer to look into this.
Cheers
Could it be related to the Chars change?
I don’t think so because the error happens at parse time. I think this is before Char plays a role, but I’ll dig into it this weekend and let you know!
Actually, this is behaving as intended, since \b is a special escape sequence for patterns (used for balanced strings, and takes two arguments in the form of the next two characters). When used in a string, \b is made a backspace, however.
We should probably just document the pattern language better.