Improve regexes #32

Merged
verbiricha merged 3 commits from improve-regex into main 2023-01-11 22:05:49 +00:00
Showing only changes of commit dd8e884f68 - Show all commits

View File

@ -61,7 +61,7 @@ export const InvoiceRegex = /(lnbc\w+)/i;
/** /**
* YouTube URL regex * YouTube URL regex
*/ */
export const YoutubeUrlRegex = /(?:https?:\/\/)?(?:www|m\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/; export const YoutubeUrlRegex = /(?:https?:\/\/)?(?:www|m\.)?(?:youtu\.be\/|youtube\.com\/(?:shorts\/|embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})/;
/** /**
* Hashtag regex * Hashtag regex