I think the point in this comment is an important one for considering syntax; quoted here:
I'll also add to those examples that Rust uses r#"..."#
, where there can be any^ (including 0) number of #
s. The typical case is r"..."
, but if the string includes a "
then one can use r#"..."..."#
, and if it includes "#
, then r##"..."#..."##
, etc. This strikes a middle ground of avoiding the unescapable-delimiter problem while still having a moderate amount of structure. The "RFC" proposing it for Rust has an even more comprehensive overview of other languages.
^ (I think there's actually a limit, but I believe it's so large enough that it's unlikely anyone would encounter it in code where using a raw string is a good idea.)