Regular Expressions 101

Community Patterns

Fetch facebook id/slug from url

1

Regular Expression
PCRE (PHP <7.3)

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

Description

use part 6

Submitted by AlmogBaku - 8 years ago