Skip to main content
2 of 3
edited tags
skaffman
  • 404.6k
  • 96
  • 825
  • 775

.NET regular expression

I have html page source code with img tags like

<p>xyz </p>< img ....... 1 . gif >........<p>xyz</p> < img ........ 2 . jpg >..............<p>xyz</p> < img ........ 3 . jpg ><p>xyz</p> < img ....... 4 . gif >......<span>xyz</span> 

Img tags can contains both jpg and other format images and can be in any order in web page source.Now I want to use .NET regular expression which can give me first img tag with JPG image like < img ... 2. jpg > or any first img tag with no gif image. Basically i want to remove smiley gif images in my regular expression

Please suggest me the regular expression

Thanks Raj

Raj
  • 13
  • 2