Simple RegExp Question...
Hey, I know this is a newbie question, and that's what I am.. but if I want to detect a double quote, I'm trying..
QRegExp rx("\\"");
which doesn't work... so what's the proper syntax for quotes in Qt? In PHP, Python that would be fine - except I'd only need one \ for the escape, two here.. but clearly I'm doing something wrong... any pointers?
Re: Simple RegExp Question...
Quote:
Originally Posted by
jared.carlson23
QRegExp rx("\\"");
Your second \ is escaped by the first one, which means the C compiler ends the string right after it and starts a new one. This example does not even compile. The correct syntax would be:
Here both the second \ and " are escaped, so the string that is passed to the constructor is \", which is what you expect.