Users Pricing

forum

Home Forums Skip Image from Content using Regex – MindStick

Skip Image from Content using Regex

Anonymous User 1256 12 Mar 2018

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);

           }

1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md