![]() |
|
|
|||||||
![]() |
ASP Net - get value from html string over regular expression |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
hello,
i have a string that contains the html code of a html-page. Very important is to know that in the page is a single image. That url i want to read from the page. I want to get the url of the image and the content of a "<p"> with a dedicated classe name (for ex. <p class="descr"> ..." Example - string variable with url-content - i show only a part of the content. vMyHtmlString=".......<TR><TD colspan="2"><img src='/image/myimages.asp?id=I368' align=LEFT></TD> <TD VALIGN=TOP><p class=descr>Adobe Acrobat ....</p></TD> </TR></TABLE></P>...." I want to get the values: -> /image/myimages.asp?id=I368 and the content from "<p class... </p>" -> Adobe Acrobat .... Adobe Acrobat .... thanks =?Utf-8?B?dGQxMzY5?= |
|
|
|
|
#2 |
|
Posts: n/a
|
This one will give you the "src" - afraid I have no time to do the other
right now. I'll be back in a week! (?i)(?s)(<img)??(?<!\1)src=["]?([^\s"]*) -- HTH, Kevin Spencer Microsoft MVP ..Net Developer If you push something hard enough, it will fall over. - Fudd's First Law of Opposition "td1369" <> wrote in message news:29D045FE-928D-4B5A-A70E-... > hello, > > i have a string that contains the html code of a html-page. > > Very important is to know that in the page is a single image. That url i > want to read from the page. > > I want to get the url of the image and the content of a "<p"> with a > dedicated classe name (for ex. <p class="descr"> ..." > > Example - string variable with url-content - i show only a part of the > content. > vMyHtmlString=".......<TR><TD colspan="2"><img > src='/image/myimages.asp?id=I368' align=LEFT></TD> > <TD VALIGN=TOP><p class=descr>Adobe Acrobat ....</p></TD> > </TR></TABLE></P>...." > > I want to get the values: > -> /image/myimages.asp?id=I368 > and the content from "<p class... </p>" > -> Adobe Acrobat .... > Adobe Acrobat .... > > thanks Kevin Spencer |
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Give you enough string functions in Java web reporting tool | freezea | Software | 0 | 10-08-2009 09:03 AM |
| Java String Problems | rbnbenjamin | General Help Related Topics | 0 | 02-03-2009 11:02 PM |
| Hidden linebreaks in string? VB.NET | Jiggy | Software | 0 | 04-23-2008 02:18 PM |
| my first question :save mht file from a html string | yours | Software | 0 | 05-12-2007 01:49 PM |
| Need Help on a Modelsim VHDL Syntax....ASAP:) | kaji | Hardware | 0 | 03-14-2007 10:41 PM |