Quantificateur inattendu, Regex
Bonjour, je suis en VbScript, et je veut lister tous les fichiers qui finissent par ISO
pour l'instant j'ai écrit ça
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Sub iniMenuIso
Dim regEx , occurrences
Dim fso, fichier, fileItem
Dim i, imax, z, valeur, cible, liste
Dim client
Set fso = CreateObject("Scripting.FileSystemObject")
Set regEx = New RegExp
regEx.Pattern = "*\.[iso]$"
'début de l'énumération
For Each client in getListeClient()
For Each fichier In fso.GetFolder(path & "\" & client & "\").Files
if regEx.Test(fichier.name ) then
msgbox fichier.name
End If
Next
Next
End Sub |
Mais j'ai une erreur sur cette ligne if regEx.Test(fichier.name ) then
Qui me dit Quantificateur inattendu. Je ne comprend pas pourquoi et je ne maitrise pas bien les regexs.
Connaissez vous sinon un autre moyen de parvenir à ce résultat