(((https?://)?(www\.)?facebook\.com/))?(.*/)?([a-zA-Z0-9.]*)($|\?.*)
https://www.regexplanet.com/share/index.html?share=tbxna
This is for isolating the page id (needed for calls to the Facebook API) from a url that a user could reasonable input.
Tags: facebook, url