String strcont =" hello "
string pattern = @"(?:https?:\/\/)?(?:www\.)?(?:(?:(?:youtube.com\/watch\?[^?]*v=|youtu.be\/)([\w\-]+))(?:[^\s?]+)?)";
string replacement = "<iframe title='" + strTitle + "' width='560' height='315' src='https://www.youtube.com/embed/$1' frameborder='0' allowfullscreen='1'></iframe>";
var rgx = new Regex(pattern);
strcont = rgx.Replace(strcont, replacement);In this code snippet you will learn how to String If Youtube url Youtube Video Show.
