Bonjour,

Je valide des QString avec QRegExp de la manière suivante :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
    bool isNomProjetNorme(QString projet)
    {
        QRegExp motif("[BDEFKPT][A-Z]{3,3}[AIMTV]{0,1}[0-9]{0,2}");
        return motif.exactMatch(projet);
    }
Cependant la fonction renvoie toujours false.

J'ai même modifié mon code ainsi :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
    bool isNomProjetNorme(QString projet)
    {
        QRegExp motif("DABCV");
        return motif.exactMatch(projet);
    }
et isNomProjetNorme("DABCV") retourne false !

Je dois avoir manqué quelque chose.