A quick test of the following perl regular expression seems to work, at least in the minimal testing that I performed:
^([1-9])(?!\1)([0-9])(?!\1|\2)([0-9])(?!\1|\2|\3)([0-9])$
^([1-9])(?!\1)([0-9])(?!\1|\2)([0-9])(?!\1|\2|\3)([0-9])$
To copy to clipboard, switch view to plain text mode
I believe this would only work with QRegularExpression (not QRegExp) and don't forget to double up the \ when you use it inside a quoted string like:
QRegularExpression regex("^([1-9])(?!\\1)([0-9])(?!\\1|\\2)([0-9])(?!\\1|\\2|\\3)([0-9])$");
QRegularExpression regex("^([1-9])(?!\\1)([0-9])(?!\\1|\\2)([0-9])(?!\\1|\\2|\\3)([0-9])$");
To copy to clipboard, switch view to plain text mode
Hope that helps.
Bookmarks