There are square brackets (not always balanced) all over the pattern strings you wrote. You should re-read the documentation of QRegExp (especially the paragraph called "Introduction", which describes the syntax and semantics of the square brackets) and you will understand what is going on.
Bookmarks