From 3b1e0350d6d77a38562742938b02e48e8e8e142a Mon Sep 17 00:00:00 2001 From: khalilcodes Date: Wed, 18 May 2022 18:54:57 +0300 Subject: [PATCH] [site][xs]: create file to store regex constants --- site/lib/constants.js | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 site/lib/constants.js diff --git a/site/lib/constants.js b/site/lib/constants.js new file mode 100644 index 0000000..2cceaed --- /dev/null +++ b/site/lib/constants.js @@ -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+)/; \ No newline at end of file