string = cfhttp.fileContent;
start = FindNoCase("<font color=red>",string);
if(start){
start = start + Len("<font color=red>");
end = FindNoCase("</font>",string,start);
content = Mid(string,start,end-start);
}
else{
// not found
content = "";
}
You don't need to do anything to cfhttp.fileContent. If it doesn't work,
try to output cfhttp.filecontent first to verify it is correct.
If you have more than one font tag, it is dangerous to use greedy
matches (.*), because it can return more than you need.
Pascal
> -----Original Message-----
> From: CFDEV [mailto:[EMAIL PROTECTED]
> Sent: woensdag 16 juni 2004 12:17
> To: CF-Talk
> Subject: RE: find function
>
> I'm not on MX :((
>
> There is more than on font tag but only one with the
> attribute color=red
>
> Where I had a font tag with a differente attribute to the
> code below, your code works great (even on CF5) but where I
> use the cfhttp.filecontent it does'nt work.
>
> Do you think there is something I need to do with the
> cfhttp.filecontent before I do the ReFindNoCase? when i
> debut, it looks like it's blocking at the first <html> tag in
> the content...
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

