Function IsolerNombres(texte)
Dim regex As Object, Matches As Object, Match As Object, res(), i
'On Error Resume Next
Set regex = CreateObject("VBScript.RegExp")
regex.Pattern = "\d+": regex.Global = True ' Motif \d+ -> un ou plusieurs chiffres
Set Matches = regex.Execute(texte)
ReDim res(1 To 1, 1 To Matches.Count)
i = 1
For Each Match In Matches
res(1, i) = Match.Value
i = i + 1
Next Match
IsolerNombres = res
Set regex = Nothing
End Function
Sub TstIsolerNombres()
IsolerNombres "1, 8, 14, 17"
End Sub