Added in \[ and \] as they are valid for passwords.

The square brackets are all that I could find, which required weird escaping for QRegExp. In qt5, QRegularExpression is apparently faster.