Hello how are u ?
i think i have Error in my Regular expression format , can any one help me??
i want to convert any youtube URL to active Iframe with src of that URL as Follow, such as if i have string
string Test="hello this is YouTube Url
http://YouTube.Com/wathc/wUdmfjfIodfm bye bye"
and i want to convert to "hello this is YouTube Url<iframe src=' http://YouTube.Com/wathc/wUdmfjfIodfm'></iframe> bye bye"
i have the following code:
string NewBody = "";
Regex regex = new Regex(@"((http(s?)://)?www\.(youtu\.be\/|youtube\.com\/)\w{11})");
NewBody= regex.Replace(Body, m => String.Format("<iframe height='100%' width='100%' src='{0}' ></iframe> ", m.Value));
but its give me the following error ...
Go to the complete details ...