Skip to main content
Known Participant
November 19, 2009
Question

Capturing all data up to a point... ReReplace?

  • November 19, 2009
  • 1 reply
  • 376 views

Hey all....

I have two variables..."doc1" and "header" .... in doc1, theres a bunch of HTML (its a variable assigned by a cffile read), halfway down the page, there is a header img file (something along the lines of <img src="header.jpg">...which I have stored in variable "header" manually (another cffile read with just the header information).

I'm trying to figure out how to capture ALL information BEFORE the header (or capture all the information before the header and the header)...AND capture all the information AFTER the header (or after the header and the header).  I'm pretty much trying to grab all the data up to a point in a variable (in this case, a CFfile Read html doc) so I can replace it.

I think I've gotten close a couple of times, but I haven't gotten it to work just right yet.  Can anyone out there give me a hand?

Thanks a bunch!

JE

    This topic has been closed for replies.

    1 reply

    Inspiring
    November 19, 2009

    Find() will tell you the starting position of your header tag.

    Left() will tell you everything up to that point.

    Right will tell you everything after that point.