Simplify regex
This commit is contained in:
parent
93ad822457
commit
ff5aeaddee
|
|
@ -1,4 +1,4 @@
|
||||||
const YOUTUBE = /^(?:https:\/\/)?(?:www.)?(?:(?:youtube.com\/watch\?v=)|(?:youtu.be\/))([a-zA-Z0-9_-]{11})(?:.+)?$/;
|
const YOUTUBE = /^(?:https:\/\/)?(?:www.)?(?:youtube.com\/watch\?v=|youtu.be\/)([a-zA-Z0-9_-]{11})(?:.+)?$/;
|
||||||
const VIMEO = /^(?:https:\/\/)?(?:www.)?vimeo.com\/([a-zA-Z0-9]*)$/;
|
const VIMEO = /^(?:https:\/\/)?(?:www.)?vimeo.com\/([a-zA-Z0-9]*)$/;
|
||||||
|
|
||||||
export function isYoutubeUrl(url) {
|
export function isYoutubeUrl(url) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue