I’ve got following regex which seems to be a valid regex according to regex coach but qt’s regexp.isValid says something else. Could anyone tell me what’s the story with this expression:
^[^,\.:;\*<>\[\]\+\"\\\/]+\.cpp$
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
According to http://doc.qt.nokia.com/latest/qregexp.html Qt/C++ needs double escaping, so try to double each backslash like this:
I removed also some of them, because inside a character class they don’t need to be escaped.