Are you escaping the backslash in your string literal? If not, then your expression is looking for "foo S" literally and not finding it.
Are you escaping the backslash in your string literal? If not, then your expression is looking for "foo S" literally and not finding it.
I am escaping the S. (trying something, it may be the S is looking for a single char)
I didn't ask about the S. The compiler will convert the string literal "foo \S" into "foo S" inside the program. If you want the regex to read "foo \S" after the compiler has done its thing then your code should read "foo \\S"
It is. I have been coding for nearly 15 years (yeouch)... this is a question about the QRegularExpression part.
Vycke
The \S in your regex has the meaning any single non-whitespace character. Presumably you mean one or more as in:
foo \S+ is a \S+
Bookmarks