The pattern is much nicer than my own. But it also matches the last period which isn’t in the url. Perhaps I need to restate my problem: I need to recognise the end of an url. The forum mangled the url. It ends with “comhem.se.” and not with “comhem.se .”. There is no space between se and the final period. The problem is that the period is legal in the middle of a url but not at the end.
That’s pretty generic - you get the URL from your RegEx and set that to “myURL” and then call my sample. If there’s no period, nothing happens. : if there is, it’s removed.
Take what the RegEx gives you and call that If … Then:
myURL = "https://groups.google.com/d/msgid/gcd-main/19e66b5e-2c1c-a1fe-b4ad-052750c290dd%40comhem.se."
If RightB(myURL, 1) = "." Then
myURL = LeftB(myURL, LenB(myURL - 1)
End If