Regular Expression

(((https?://)?(www\.)?facebook\.com/))?(.*/)?([a-zA-Z0-9.]*)($|\?.*)

Details

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

blog comments powered by Disqus