[site][xs]: create file to store regex constants

This commit is contained in:
khalilcodes 2022-05-18 18:54:57 +03:00
parent 3b1671f882
commit 3b1e0350d6
1 changed files with 3 additions and 0 deletions

3
site/lib/constants.js Normal file
View File

@ -0,0 +1,3 @@
export const YOUTUBE_REGEX = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/;
export const TWITTER_REGEX = /^https?:\/\/twitter\.com\/(?:#!\/)?(\w+)\/status(es)?\/(\d+)/;