also thanks. But this was only an example, the real regexp was more
complicated and I only wondered why my first approach didn't work.
Especially because it workes fine in Perl - and also vbscript.regexp ;-)
FWIW, to realize this with greedy quantifier and leave exactly two chars
for the later subexpressions you could also use a negative lookahead:
Martin Gebert schrieb:
Bernd Strohhaecker schrieb:
with setMinimal(true) and the string "abc" I expected the QRegExp
"^(.*)(.)?(.)?$" to set the submatches $1=a, $2=b and $3=c.
Jasmins competent and authorative answer aside ;-) you could try if
"^(.)*(.)?(.)?$" or "^(.)?(.)?(.)?$" accomplishes what you need. But
that's just a "if you don't know how it works, try to find out" approach...
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/