Jamie this will extract the email addresses out of the html page for you
<cfsavecontent variable="str"> <a href="mailto:[EMAIL PROTECTED]>steve</a> <a href=mailto:[EMAIL PROTECTED]>steve</a> <a href="mailto:[EMAIL PROTECTED]">steve</a> <a href=mailto:[EMAIL PROTECTED]>steve</a> <a href="mailto:[EMAIL PROTECTED]">steve</a> <a href=mailto:[EMAIL PROTECTED]>steve</a> </cfsavecontent> <cfset mail = reFindNoCase("(mailto:)([^"" >]*)", str, 0, true)> <cfif mail.len[1] GT 0> <cfloop condition="mail.len[1] NEQ 0"> <cfoutput>#MID(str, mail.pos[3], mail.len[3])#</cfoutput><br> <cfset mail = reFindNoCase("(mailto:)([^"" >]*)", str, mail.pos[1]+mail.len[3], true)> </cfloop> </cfif> Steve -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jamie Lawrence Jenner Sent: Thursday, May 05, 2005 7:18 PM To: CFAussie Mailing List Subject: [cfaussie] Re: extracting email addresses It is basically html code, with emails scattered all over the place. it was their business directory, so unfortunately i cant use anything a s clear delimiter any other ideas? carriage returns - thats what my train does everyday when i go to the station on my way home carriage returns - some strange super human hero comes back from the dead cheers jamo > Are they separated in any way? If so, you can just copy and paste > into a text file and import into something like Access, specifying the > delimiter. Even if it is just carriage returns, you can just copy > straight from the browser into excel and it will treat the returns as > new rows. > > Chad > who wonders when they will stop using the term carriage returns for compute= > rs. > > On 5/5/05, Jamie Lawrence Jenner <[EMAIL PROTECTED]> wrote: > > hi there, > >=20 > > i have just been given a html page with over 1000 email addresses and i > > have been asked to insert them all into a db. I dont like typing so i > > thought i could use some sort of loop and a reg ex. I have a reg ex for > > validating email addresses. My thoughts are maybe to use the find > > function, to find the first 'mailto:' position, then, find the position o= > f > > the end of the email address, by looking for .com, .co.uk .net etc, of > > the address after the mailto, then use the remove function to remove the > > before mailto string and the after .com portions, insert the email into > > the db, then carry on processing the 'after' part of the string > >=20 > > I have tried to do this myself, but i just cant get it to work. > >=20 > > It is mashing my now hurting head > >=20 > > any ideas? > >=20 > > TIA > >=20 > > Jamo > >=20 > > --- > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to [EMAIL PROTECTED] > m.au > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/ --- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
