Em Andamento

Using Regexp to Parse HTML

I am writing a class in C# that will print out the contents of all HTML tablerows (<tr></tr>) on a given page. Here is what I'm trying to do:

******************************

private void regex(string texttosearch){

String regexpstring = [url removed, login to view](texttosearch, "<tr align=\"center\">.*</tr>", [url removed, login to view] | [url removed, login to view]).Groups[1].Value;

[url removed, login to view]("'" + regexpstring + "'<br />");

}

*******************************

However, I think something is wrong with the regexp string. My thinking is this:

<tr align=\"center\"> I figured this would match the start of the tablerow (<tr align="center">).

.* I figured this would match everything in between.

</tr> I figured this would match the end of the tablerow.

***************************

I was hoping someone out there could show me how to do this.

Writing code would only be necessary if you can't talk me through it first.

Tom

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

IIS6.0, ASP.NET2.0, Windows Server 2K3 Standard

Habilidades: Engenharia, MySQL, PHP, Arquitetura de software, Teste de Software, Interface do usuário / AI, Hospedagem Web, Gestão de Site , Teste de Website

Ver mais: writing standard form, writing html code, string match, regex is, regex explained, php string html, source html, match string, write legal agreement, write hire agreement, gnu regex, tom b, write contents, php regex, legal tr, all html, php regex html, html regex, string html, web print software html, regex php, platform regex, value engineering, html code writing, response write

Acerca do Empregador:
( 2 comentários ) United States

ID do Projeto: #3052759

Premiar a:

mohamedalkh

See private message.

$1 USD em 2 dias
(3 Avaliações)
0.0