This regex is what you're looking for (mandatory regex101 link):
(https?:\/\/\S+)|([a-z]+\.[a-z]+(?:\/\S+)?)
It's basically the two regexes https?:\/\/\S+ and [a-z]+\.[a-z]+(?:\/\S+)? placed into capturing groups (so that you can extract all URLs with a global search) and then combined with an OR.
https?:\/\/\S+ finds URLs that are prefixed with http:// or https:// by matching:
- The string "http" literally
http, followed by
- An optional "s"
s? followed by
- A colon and two forward slashes
:\/\/, followed by
- One or more non-whitespace characters
\S+
If https?:\/\/\S+ doesn't match, then [a-z]+\.[a-z]+(?:\/\S+)? kicks in and finds URLs that are not prefixed with http:// or https:// and whose top level domains don't contain numbers by matching:
- One or more lowercase letters
[a-z]+, followed by
- A dot
\., followed by
- One or more lowercase letters
[a-z]+, followed by
- An optional group, which consists of
- A forward slash
\/, followed by
- One or more non-whitespace characters
\S+