Function SepNom(c As String) As String
Dim oRegExp As Object, occ As Object
Set oRegExp = CreateObject("vbscript.regexp")
With oRegExp
.Global = True
.Pattern = "([A-Z]{2,}.+°.+[^A-Z]{2,})([A-Z]{2,}.+)"
If .test(c) Then
Set occ = .Execute(c)
SepNom = .Replace(c, occ.Item(0).submatches(1)): Exit Function
End If
.Pattern = "([^A-Z]+)([A-Z]{2,}.+)"
If .test(c) Then
Set occ = .Execute(c)
SepNom = .Replace(c, occ.Item(0).submatches(1)): Exit Function
End If
End With
End Function