Link to home
Create AccountLog in
Avatar of sal1150
sal1150

asked on

search and copy from html page

I get htis line from my html page.
I want to take (parse) only the status "market closed" and put it in editbox.

<TD class=index_up_pre_open id=PC_7_1_569_TASI_MARKET_STATUS noWrap
   align=middle height=18>market closed </TD>


ASKER CERTIFIED SOLUTION
Avatar of zion29
zion29

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Lesko987
Lesko987

Hi sal1150,

Maybe you can just check if text "market closed" appears in page.

Function isMarketClosed (HTMLPage: String): Boolean;
Begin
  Result := Pos ('market closed', HTMLPage) > 0;
End;

and use it like this S being HTML document.

If isMarketClosed (S) Then Begin
//market is closed
End Else Begin
//market is opened
End;

Cheers!
Avatar of sal1150

ASKER

Hi Lesko987
no there are 4 status for the market
market closed
market open
market before close
market before open


any way I make some change in zion29  code and it is now ok.