|
| algo comparaison masque de fichiers (*test*.*) |
| Iniciado por eric.coutier, 13,sep. 2019 14:36 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 13,septiembre 2019 - 14:36 |
Bonjour,
Quelqu'un aurait-il déjà fait une procédure pour pouvoir comparer un nom de fichier avec un masque de type *test*.*
Le but est une procédure qui renverrait vrai si tel nom de fichier correspond à un "masque".
Exemple : test.csv correspond bien à *test.csv ou *test*.csv ou *.csv, etc...
Merci d'avance. |
| |
| |
| | | |
|
| | |
| |
Miembro registrado 24 mensajes |
|
| Publicado el 13,septiembre 2019 - 15:07 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 13,septiembre 2019 - 15:36 |
Effectivement, je n'y avais pas pensé.
Donc voici mon code:
Procedure pl_TestMasque(pp_chn_NomFichier est une chaîne, pp_chn_MasqueEtoile est une chaîne)
v_chn_RexExp est une chaîne = Remplace(pp_chn_MasqueEtoile, ".", "\.") v_chn_RexExp = Remplace(pp_chn_MasqueEtoile, "?", ".{1}") v_chn_RexExp = Remplace(v_chn_RexExp, "*", ".{0,}")
RENVOYER VérifieExpressionRégulière(pp_chn_NomFichier, v_chn_RexExp) |
| |
| |
| | | |
|
| | | | |
| | |
|