A backslash changes how Java interprets the following character. Forgetting to escape a literal backslash usually causes a compilation error, but accepted sequences can silently produce the wrong string. section 6.7
Windows paths and regular expressions
A Windows path containing sequences such as \b or \t can become a string containing a backspace or tab instead of directory text. Regular expressions add a second interpreter: Java \b means backspace, while the regular-expression engine treats it as a word boundary. Escape the backslash for the regex when necessary, and prefer Path.of(installationPath, "bin", "tar.exe") for paths. section 6.7
Avoid accidental escape sequences by applying these checks:
- Escape a literal backslash instead of writing it directly. section 6.7
- Inspect regex patterns at both levels: Java string parsing and regular-expression parsing. section 6.7


