youtubeRegex constant

String const youtubeRegex

It Validates if URL is a YouTube Video URL (Also Validates Links Shared from Mobile)

Implementation

static const String youtubeRegex =
    r'^((?:https?:)?\/\/)?((?:www|m)\.)?((?:youtube(-nocookie)?\.com|youtu.be))(\/(?:[\w\-]+\?v=|embed\/|v\/)?)([\w\-]+)(\S+)?$';