6 Replies Latest reply on Dec 21, 2008 1:10 PM by BKBK

    Parsing HTML returned from CFHTTP

      I am trying to create a function that will parse out individual pieces of information returned by a cfhttp request. I need the name of the city, country, and state returned. I need the script to start at the word " CITY: ", " STATE: ", and " COUNTRY: " respectively and ends at <br>. I know I can use findNoCase to locate the start point, but how can I say 'get until you reach the next <br>' ?

      Here is my returned data (I bolded what I need returned):
      <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <HTML><HEAD><TITLE>Geo Results</TITLE> </HEAD><BODY> VERSION=1.0<br> <p> TARGET:<br> NAME: IANA-BBLK-RESERVED1<br> NUMBER: -<br> CITY: AMSTERDAM<br> STATE: NORTH HOLLAND (province) <br> COUNTRY: NL<br> LAT: 52.35<br> LONG: 4.90<br> LAT_LONG_GRAN: City<br> LAST_UPDATED: <br> NIC: RIPE<br> LOOKUP_TYPE: Block Allocation<br> RATING: <br> DOMAIN_GUESS: ripe.net<br> STATUS: OK<br> </BODY></HTML>