`
收藏列表
标题 标签 来源
qt 正则表达式
bool isValidName(QString name){
    QString pattern("[a-zA-Z0-9,.\\-_]{1,32}");
    QRegExp rx(pattern);

    bool match = rx.exactMatch(name);
    return match;
}
bool isValidPassword(QString password){
    QString pattern("[a-zA-Z0-9,.\\-_~!@#$%^&*()+=\\{\\}\\[\\]'\"?|\\\/\\\\]{4,20}");
    QRegExp rx(pattern);

    bool match = rx.exactMatch(password);
    return match;
}
Global site tag (gtag.js) - Google Analytics