1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| Sub ChercherLeMot()
Dim LeMot() As String, LaChaine
Dim i As Byte
Dim j As Byte
Dim ok As Boolean
LaChaine = Array("ENV:/u01/<psid>/ssy/", "KLK", "ORA", "BFE:/u02/", "/u03/<pSID>/FIND/appl")
For k = 0 To UBound(LaChaine)
i = 1
If InStr(LaChaine(k), "<") <> 0 Then LaChaine(k) = _
Left(LaChaine(k), InStr(LaChaine(k), "<") - 1) & _
Right(LaChaine(k), Len(LaChaine(k)) - InStr(LaChaine(k), ">"))
MsgBox LaChaine(k)
Do
If Mid(LaChaine(k), i, 1) Like "[A-Z]" Then
ReDim Preserve LeMot(j)
LeMot(j) = LeMot(j) + Mid(LaChaine(k), i, 1)
ok = True
End If
i = i + 1
Loop While i <= Len(LaChaine(k))
If ok Then
j = j + 1
ok = False
End If
Next
For i = 0 To UBound(LeMot)
MsgBox LeMot(i)
Next
End Sub |
Partager