Regular Expressions 101

Community Patterns

123...6

Facebook profile URL pattern

0

Regular Expression
PCRE (PHP <7.3)

/
^(http\:\/\/|https\:\/\/)?(?:www\.)?facebook\.com\/(?:(?:\w\.)*#!\/)?(?:pages\/)?(?:[\w\-\.]*\/)*([\w\-\.]*)
/
i

Description

Pattern that check your string to match Facebook user profile URL.

Submitted by JSC Quatrodev - 9 years ago