Brain Farm Aerial Reel

By: Brain Farm

458   3   56405

Uploaded on 04/16/2012

Artist: Mod Era
Song Title: "Love In Peace"

Brain Farm provides precise stabilized HD aerial footage using both the Cineflex ELITE and Cineflex V14 HD for film, commercial, and television work throughout the entire world. With thousands of hours of air to air and air to ground experience, we can consult on the best way to achieve a project's goals and set up an efficient and safe aerial shoot.

like us on facebook at

for more info visit us at:

Comments (3):

By anonymous    2018-03-05

String urlid="" ;
String  url="";
Pattern pattern = Pattern.compile("(?:http|https|)(?::\\/\\/|)(?:www.|)(?:youtu\\.be\\/|youtube\\.com(?:\\/embed\\/|\\/v\\/|\\/watch\\?v=|\\/ytscreeningroom\\?v=|\\/feeds\\/api\\/videos\\/|\\/user\\\\S*[^\\w\\-\\s]|\\S*[^\\w\\-\\s]))([\\w\\-\\_]{11})[a-z0-9;:@#?&%=+\\/\\$_.-]*");
    Matcher result = pattern.matcher(url);
    if (result.find())


This matches almost all youtube urls.

latest short format: 
iframe (secure):
object param:
object embed:
more params:
query may have dot:
nocookie domain:

Original Thread

By anonymous    2017-09-20

A YouTube video URL may be encountered in a variety of formats:

  • latest short format:
  • iframe:
  • iframe (secure):
  • object param:
  • object embed:
  • watch:
  • users:
  • ytscreeningroom:
  • any/thing/goes!:
  • any/subdomain/too:
  • more params:
  • query may have dot:
  • nocookie domain:

Here is a PHP function with a commented regex that matches each of these URL forms and converts them to links (if they are not links already):

// Linkify youtube URLs which are not already links.
function linkifyYouTubeURLs($text) {
    $text = preg_replace('~(?#!js YouTubeId Rev:20160125_1800)
        # Match non-linked youtube URL in the wild. (Rev:20130823)
        https?://          # Required scheme. Either http or https.
        (?:[0-9A-Z-]+\.)?  # Optional subdomain.
        (?:                # Group host alternatives.
          youtu\.be/       # Either,
        | youtube          # or or
          (?:-nocookie)?   #
          \.com            # followed by
          \S*?             # Allow anything up to VIDEO_ID,
          [^\w\s-]         # but char before ID is non-ID char.
        )                  # End host alternatives.
        ([\w-]{11})        # $1: VIDEO_ID is exactly 11 chars.
        (?=[^\w-]|$)       # Assert next char is non-ID or EOS.
        (?!                # Assert URL is not pre-linked.
          [?=&+%\w.-]*     # Allow URL (query) remainder.
          (?:              # Group pre-linked alternatives.
            [\'"][^<>]*>   # Either inside a start tag,
          | </a>           # or inside <a> element text contents.
          )                # End recognized pre-linked alts.
        )                  # End negative lookahead assertion.
        [?=&+%\w.-]*       # Consume any URL (query) remainder.
        ~ix', '<a href="$1">YouTube link: $1</a>',
    return $text;

; // End $YouTubeId.

And here is a JavaScript version with the exact same regex (with comments removed):

// Linkify youtube URLs which are not already links.
function linkifyYouTubeURLs(text) {
    var re = /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube(?:-nocookie)?\.com\S*?[^\w\s-])([\w-]{11})(?=[^\w-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig;
    return text.replace(re,
        '<a href="$1">YouTube link: $1</a>');


  • The VIDEO_ID portion of the URL is captured in the one and only capture group: $1.
  • If you know that your text does not contain any pre-linked URLs, you can safely remove the negative lookahead assertion which tests for this condition (The assertion beginning with the comment: "Assert URL is not pre-linked.") This will speed up the regex somewhat.
  • The replace string can be modified to suit. The one provided above simply creates a link to the generic "" style URL and sets the link text to: "YouTube link: VIDEO_ID".

Edit 2011-07-05: Added - hyphen to ID char class

Edit 2011-07-17: Fixed regex to consume any remaining part (e.g. query) of URL following YouTube ID. Added 'i' ignore-case modifier. Renamed function to camelCase. Improved pre-linked lookahead test.

Edit 2011-07-27: Added new "user" and "ytscreeningroom" formats of YouTube URLs.

Edit 2011-08-02: Simplified/generalized to handle new "any/thing/goes" YouTube URLs.

Edit 2011-08-25: Several modifications:

  • Added a Javascript version of: linkifyYouTubeURLs() function.
  • Previous version had the scheme (HTTP protocol) part optional and thus would match invalid URLs. Made the scheme part required.
  • Previous version used the \b word boundary anchor around the VIDEO_ID. However, this will not work if the VIDEO_ID begins or ends with a - dash. Fixed so that it handles this condition.
  • Changed the VIDEO_ID expression so that it must be exactly 11 characters long.
  • The previous version failed to exclude pre-linked URLs if they had a query string following the VIDEO_ID. Improved the negative lookahead assertion to fix this.
  • Added + and % to character class matching query string.
  • Changed PHP version regex delimiter from: % to a: ~.
  • Added a "Notes" section with some handy notes.

Edit 2011-10-12: YouTube URL host part may now have any subdomain (not just www.).

Edit 2012-05-01: The consume URL section may now allow for '-'.

Edit 2013-08-23: Added additional format provided by @Mei. (The query part may have a . dot.

Edit 2013-11-30: Added additional format provided by @CRONUS:

Edit 2016-01-25: Fixed regex to handle error case provided by CRONUS.

Original Thread

Popular Videos 39499

Submit Your Video

If you have some great dev videos to share, please fill out this form.