Regular Expressions 101

Community Patterns

facebook regex video

1

Regular Expression
PCRE (PHP <7.3)

~
^http(?:s)?://(?:www.)?facebook.com/(?:video.php\?v=|video/video.php\?v=|photo.php\?v=|v/|.*?/videos/)([\d]+?)(&\S+?)?$
~
gm

Description

videos and some example...

Submitted by bomale - 9 years ago