Best way to extract URL in a string

Hi guys,

I'm wondering what's the best way to extract the value of a url in a string.

Lets say I have this value in a variable:

"My website https://tg.me/123455"

I want to retrieve the URL only "https://tg.me/12345"

The 12345 path can vary

I've tries some regex but no luck

Thanks!

4 replies