The documentation page for QRegExp says at multiple points that newline (\n) and return (\r) are recognized and are found as part of whitespace (\s). This is misleading because QTextDocument::find cannot match a regexp across a block boundary (see this forum post:http://developer.nokia.forums.com/viewthread/6665). Hence you cannot get a match to any \n in a QPlainTextEdit at all, either as \n or as \s; and you cannot get a match to any pattern when the target spans two or more lines. For instance, the example in QRegExp of searching for <i>-markup can only work when the open and closing markup are both on a single line. In a QTextEdit, you cannot get a match that spans paragraphs. This restriction is unrelated to the use of minimal or regexp2 syntax.