Regular Facebook URL update

I am trying to validate facebook video url using regex.

this is an example of Valid fb video url: (VALID)

this is an example url of a valid fb video with username: {username} / video / 100000000000000

note: {username} can contain any string. example: (VALID) (VALID)

But my reqex is still wrong if I check the url of the video snippet with the username.
This is my regex:



You can run it:


source to share

3 answers

This will work for you:






This is slightly different from Pedro, but it works well.




Neither of the two existing ones worked for me, not to say they have few visible cases.

So here's my REGEX suggestion :



I ignored video.php

, I think he's old enough to safely ignore him.

Matches: 2 & theater // / videos / 1828228624061666 / / 18282286240612666 /

I don't own or watch any of the videos. I just picked random ones that were in my facebook post.


  • Video ID.


You can easily test it yourself with Regex101



All Articles