I want to skip image from content ..this is my sample code please help
@{
string regexImgSrc = @"<img[^>]*?src\s*=\s*[""']?([^'"" >]+?)[ '""][^>]*?>";
}
@if (post.Content.Length > 70)
{
var str = post.Content.Substring(0, 70);
}
Home / DeveloperSection / Forums / Skip Image from Content using Regex
I want to skip image from content ..this is my sample code please help
@{
string regexImgSrc = @"<img[^>]*?src\s*=\s*[""']?([^'"" >]+?)[ '""][^>]*?>";
}
@if (post.Content.Length > 70)
{
var str = post.Content.Substring(0, 70);
}
Anonymous User
12-Mar-2018try this code this will helps you