Results 1 to 3 of 3

Thread: parsing html using regex

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2009
    Posts
    135

    parsing html using regex

    Hello There,
    i need help parsing html using regex..i am hardly find the exact expression to use.

    this is my html


    HTML Code:
    <HTML> 	
          <HEAD>
                  <LINK rel="stylesheet" type="text/css" href="BacoSystem.css"/>    </HEAD>
    <BODY> 
          <DIV class="HdrTitle"> 
          <TABLE width="100%" border="0" cellpadding="0" cellspacing="0" id="Table1"><TR><TD width="55px" align="left"><IMG src="Images/hdSystem.gif" height="24px"/></TD>
    <TD align="left"><SPAN style="font-size:medium; font-weight:bold">XML: Upload - Results</SPAN></TD></TR>
    </TABLE>
    </DIV><DIV class="HdrProps"></DIV>
    <TABLE class="ListShort"><TR class="Section"><TH colspan="5">Results</TH></TR><TR class="Separator"><TD colspan="5" class="Sep1"></TD></TR><TR class="Header"><TD colspan="2">Date</TD><TD colspan="3">Description</TD></TR>
    <TR class="DataOutline1"><TD colspan="5">Transactions</TD></TR>
    <TR class="DataDark"><TD width="20px"><IMG src="Images\imgMessage.gif"/></TD><TD NOWRAP>04/04/2011 10:47</TD><TD NOWRAP>Costcenter</TD><TD NOWRAP></TD><TD>Created: 0, Updated: 1, Rejected: 0</TD></TR>
    <TR class="DataLight"><TD width="20px"><IMG src="Images\imgMessage.gif"/></TD><TD NOWRAP>04/04/2011 10:47</TD><TD NOWRAP>GLTransaction</TD><TD NOWRAP></TD><TD>Created: 0, Updated: 1, Rejected: 0</TD></TR>
    </TABLE>
    </BODY>
    </HTML>
    i want to get all strings inside <TD NOWRAP></TD> and <TD></TD> also exlude the datetime inside<TD NOWRAP></TD>

    this is what i had now..it still display the datetime
    Code:
    (NOWRAP>|<TD>)[a-zA-Z0-9.,'() /:&\d_-]+

  2. #2
    Lively Member
    Join Date
    Apr 2011
    Location
    At home
    Posts
    64

    Re: parsing html using regex

    /<A.*HREF="d?.*?>(.*?)</A>/ (try this I'm note sure if it works It's been awhile lol)

  3. #3
    Lively Member
    Join Date
    Apr 2011
    Location
    At home
    Posts
    64

    Re: parsing html using regex

    Change the things you need HREF etc to your likes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width