%{
#include <stdio.h>
%}
%%
"Numéro de téléphone :"[ \t]*[+]?[0-9]{10} { printf("Numéro de téléphone : %s\n", yytext); }
"E-mail :"[ \t]*[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} { printf("E-mail : %s\n", yytext); }
"Nom d'utilisateur :"[ \t]*[a-zA-Z0-9_]+ { printf("Nom d'utilisateur : %s\n", yytext); }
"Date de naissance :"[ \t]*[0-9]{2}[-/][0-9]{2}[-/][0-9]{4} { printf("Date de naissance : %s\n", yytext); }
"/*"[^*]*"*/" { printf("Commentaire : %s\n", yytext); }
"Note :"[ \t]*[0-9]+\.[0-9]+ { printf("Note : %s\n", yytext); }
[a-zA-Z0-9]+ { printf("Données : %s\n", yytext); }
.|\n { /* Ignorer tout autre texte */ }
%%
int main() {
printf("Entrez des textes contenant des informations personnelles et des notes :\n");
yylex();
return 0;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgolJQoKIk51bcOpcm8gZGUgdMOpbMOpcGhvbmUgOiJbIFx0XSpbK10/WzAtOV17MTB9IHsgcHJpbnRmKCJOdW3DqXJvIGRlIHTDqWzDqXBob25lIDogJXNcbiIsIHl5dGV4dCk7IH0KIkUtbWFpbCA6IlsgXHRdKlthLXpBLVowLTkuXyUrLV0rQFthLXpBLVowLTkuLV0rXC5bYS16QS1aXXsyLH0geyBwcmludGYoIkUtbWFpbCA6ICVzXG4iLCB5eXRleHQpOyB9CiJOb20gZCd1dGlsaXNhdGV1ciA6IlsgXHRdKlthLXpBLVowLTlfXSsgeyBwcmludGYoIk5vbSBkJ3V0aWxpc2F0ZXVyIDogJXNcbiIsIHl5dGV4dCk7IH0KIkRhdGUgZGUgbmFpc3NhbmNlIDoiWyBcdF0qWzAtOV17Mn1bLS9dWzAtOV17Mn1bLS9dWzAtOV17NH0geyBwcmludGYoIkRhdGUgZGUgbmFpc3NhbmNlIDogJXNcbiIsIHl5dGV4dCk7IH0KCiIvKiJbXipdKiIqLyIgeyBwcmludGYoIkNvbW1lbnRhaXJlIDogJXNcbiIsIHl5dGV4dCk7IH0KCiJOb3RlIDoiWyBcdF0qWzAtOV0rXC5bMC05XSsgeyBwcmludGYoIk5vdGUgOiAlc1xuIiwgeXl0ZXh0KTsgfQoKW2EtekEtWjAtOV0rIHsgcHJpbnRmKCJEb25uw6llcyA6ICVzXG4iLCB5eXRleHQpOyB9CgoufFxuIHsgLyogSWdub3JlciB0b3V0IGF1dHJlIHRleHRlICovIH0KCiUlCgppbnQgbWFpbigpIHsKICAgIHByaW50ZigiRW50cmV6IGRlcyB0ZXh0ZXMgY29udGVuYW50IGRlcyBpbmZvcm1hdGlvbnMgcGVyc29ubmVsbGVzIGV0IGRlcyBub3RlcyA6XG4iKTsKICAgIHl5bGV4KCk7CiAgICByZXR1cm4gMDsKfQ==