I'm looking for a correct regex expression that Facebook uses to validate entered Website URL or Display link when user wants to create an ad in Ads Manager (you will see the mentioned input fields on attached screenshot below).
I need that because platform we're developing uses Facebook Marketing API to create ads on Facebook. So in order not to get API request failure from Facebook I would like to perform a validation before we fire a request to the API. I've been using a few different regexes so far to perform validation but the issue comes back again and again. That's the reason why I come up with question to you.
So my question is, does anyone here used some url validation regex that works well with Facebook? I couldn't find anything on Facebook docs related to this validation, so any help from your side is welcome.
Here is the list I've been using to validate urls https://pastebin.com/0zU6MSme
@update I moved the list to the pastebin
because previous link didn't work
The original list I took from here: Original URL List