A raw string literal writes its contents without interpreting ordinary C++ escape sequences. It starts with R"( and ends with )", making regular-expression patterns easier to read when backslashes would otherwise become difficult to distinguish from C++ formatting. section 4.8
Compare escaped and raw patterns
To match two backslashes, an escaped string requires std::string pattern = "\\\\";, while the raw form is std::string pattern = R"(\\)";. The raw version shows the characters being matched more directly. In a regular expression, necessary escapes still matter: an escaped period means “match a period” rather than any single character. section 4.8


