I want to declare the same regular expression pattern for both languages. For TCL, I do it
set pattern "\d\s\S"
but for C ++ I have to do this for the same template
boost::regex pattern("\\d\\s\\S");
otherwise the C ++ compiler will tell us the following:
warning C4129: 'd' : unrecognized character escape sequence
so why doesn't TCL try to find the escape characters \ d \ s \ S and just ignore \ -s, but does C ++ also suck?
PS PHP works like TCL, as I recall.
source share