PDA

View Full Version : How to work around QRegExp dot-matches-newline?



dave
10th March 2010, 18:03
I'm trying to create a regular expression which will find every occurrence of a sentence enclosed in "" on a single line. I have tried this "\".\"" which doesn't work because the dot in QRegExp matches everything including newlines.

Is there any other simple way to do this?

Dave

wysota
10th March 2010, 18:19
Try this:


QRegExp rx("\"[^\"\n]*\"");