On 5/27/13 6:17 PM, Bo Thorsen wrote: > When I do regular expressions for complete lines, I use something like this: > > QRegExp r("^(PROGRAM WARNING|!\\s+)(.*)$"); > > r.cap(1) should be the first part, which you don't need. r.cap(2) should > be the text you are interested in. Thanks, that did the trick!