TOML strings always wear quotes
Basic strings — double-quoted, with escapes
"hello\nworld". Same JSON-style escapes (\n \t \\ \" \uXXXX). The default for short strings.
Multi-line basic strings — triple double-quoted
""" line one\nline two """. Escapes work; \ at end of line trims the following whitespace, useful for breaking long lines without inserting a real newline.
Literal strings — single-quoted, no escapes
'C:\Users\Pippa' is exactly those characters. No backslash interpretation, no special meaning. Perfect for Windows paths and regex patterns.
Multi-line literal strings — triple single-quoted
'''line one\nline two'''. Whatever you write, the parser preserves it byte-for-byte (except a leading newline right after the opening fence is trimmed).
Principle: use literal strings (single quotes) for paths, regexes, and Windows-style backslashes — the no-escape rule eliminates an entire class of typos. Use basic strings (double quotes) when you need
\n, Unicode escapes, or interpolation. Use multi-line forms when the content is itself multi-line.