J'ai un fichier txt généré. Ce fichier contient certaines lignes qui sont superflues et qui doivent être supprimées. Chaque ligne qui doit être supprimée comporte l'une des deux chaînes suivantes : "ERREUR" ou "RÉFÉRENCE". Ces jetons peuvent apparaître n'importe où dans la ligne. Je voudrais supprimer ces lignes, tout en conservant toutes les autres lignes.
Donc, si le fichier txt ressemble à ceci :
Good Line of data
bad line of C:\\Directory\\ERROR\\myFile.dll
Another good line of data
bad line: REFERENCE
Good line
Je voudrais que le fichier se termine comme ceci :
Good Line of data
Another good line of data
Good line
TIA.