Quote Originally Posted by paolom View Post
I use this expression to validate both some QString from file and QString from QLineEdit.
  1. for the QLineEdit validation, why not use the maxLength property instead?
  2. for the "string from file" validation why use a regexp at all if you only care about the size?
Quote Originally Posted by paolom View Post
Is there a limit to max number of quantifiers in QRegExp?
I've never bothered to check before but apparently yes, although it is not mentioned in the docs. A quick look at the source tells us that quantifiers are bounded by "InftyRep" which appears to be set to 1025... To be honest I've not dug far enough to check how this constant impact quantifier bounds but its very existence is worrying as it would suggest that even a star quantifier is bounded to as little as 1024 repetition (not that I ever bumped into this but still...).