Regular Expressions 101

Community Patterns

Extract facebook video id

1

Regular Expression
PCRE (PHP <7.3)

~
^(?:(?:https?://)?(?:www|mobile|web|0)\.)?facebook\.com/(?:video\.php\?v=|.*?/videos/)(\d+)$
~
gm

Description

no description available

Submitted by Stathis Aliprandis - 8 years ago