Maybe it’s feasible to take the approach to delimiting strings from the sed
program? It lets the user choose whatever delimiter is convenient each time, so that no characters need to be escaped at all. In Julia such an approach could look similar to this, for example:
raw"regular string"
raw|delimited by vertical bars|
raw/delimited by slashes/
raw'single quotes'
# etc
Not exactly as shown - it is ambigious parsing. But something along these lines should be possible, I think.