here ya go (watch wrap):

links = arraynew(1);
apos = refindnocase("<a[^>]*>", maildata.htmltext[1], 1, true);
while (apos.len[1]) {           
        arrayappend(links, mid(maildata.htmltext[1],
apos.pos[1],apos.len[1]));
        apos = refindnocase("<a[^>]*>", maildata.htmltext[1], apos.pos[1]+1,
true);
}

> -----Original Message-----
> From: Alex Skinner [mailto:[EMAIL PROTECTED] 
> Sent: 13 October 2003 09:28
> To: [EMAIL PROTECTED]
> Subject: [ cf-dev ] OT : Regex
> 
> 
> Morning,
> 
> I have a file which contains HTML and I want to go through 
> the whole thing and extract the urls.
> 
> I'm then going to loop through all of them and replace them 
> with a new alternative syntax.
> 
> Does anyone have a Regex that will match a url so I can pull 
> all of the urls in a doc out into an array ?
> 
> Ta
> 
> Alex
> 
> 
> 
> 
> -- 
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED] For human help, e-mail: 
> [EMAIL PROTECTED]
> 


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to