Regular Strings
Regular strings — quoted strings with escape sequences.
Syntax
regularString = '"' { dqChar | escapeSequenceDQ } '"' | "'" { sqChar | escapeSequenceSQ } "'"
dqChar = any Unicode code point except '"' or '\'
sqChar = any Unicode code point except "'" or '\'
escapeSequenceDQ = '\' ( '"' | "'" | '\' | 'b' | 'f' | 'r' | 'n' | 't' | unicodeEscape | hexEscape | other )
escapeSequenceSQ = '\' ( "'" | '"' | '\' | 'b' | 'f' | 'r' | 'n' | 't' | unicodeEscape | hexEscape | other )
unicodeEscape = 'u' hex4
hexEscape = 'x' hex2
hex4 = 4 hexadecimal digits (must form a valid Unicode code point)
hex2 = 2 hexadecimal digits
other = any character except 'u' or 'x'Structural characters
Symbol
Name
Unicode
Description
Valid forms
Optional behaviors
Comments
Invalid forms
Preservation of structure
See Also
Last updated
Was this helpful?
