Skip to main content
deleted 15 characters in body
Source Link
Oded
  • 500.7k
  • 102
  • 900
  • 1k

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

< 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

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

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

edited tags
Link
skaffman
  • 404.6k
  • 96
  • 825
  • 775
Source Link
Raj
  • 13
  • 2

.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