First, I think you have a typo...
E-mail: <a
href="Mailto:[email protected]"[email protected]</a>¬
is missing the closing '>'
E-mail: <a
href="Mailto:[email protected]">[email protected]</a>¬
secondly, the href string does not have to be enclosed in quotes, so
E-mail: <a href=Mailto:[email protected]>[email protected]</
a>¬
would work.
------- start code --------
-- assumes a masterList variable set to all lines
-- 1000 email addresses takes about 6 seconds on an older Mac
put masterList into emailLinesOnly
filter emailLinesOnly with "*...@*"
set the itemDel to ":"
repeat for each line LNN in emailLinesOnly
put word 1 to -1 of item 2 of LNN & tab & 0 & cr after newLines
-- the 0 is a placeholder
end repeat
filter newLines without empty
split newLines using cr and tab
--dups have now been removed
--sequence does not matter
put the keys of newLines into emailAddrList
filter emailAddrList without empty
set the itemdel to tab
repeat for each line LNN in emailAddrList
replace LNN with ("<a href=" & LNN & ">" & LNN & "</a>") in
masterList
--handles duplicate email addresses in one replace step
end repeat
put masterList into msg
------- end code --------
Jim Ault
Las Vegas
On Mar 26, 2010, at 8:40 PM, Sivakatirswami wrote:
anyone have an efficient script for tagging email address with links?
let's say I have a chunk of plain text made up of one or more of
these:
And we want to replace them with links
Mr. Wonder Boy
108 Webster Avenue
1004 Mount Zena,
NEW ZEALAND
E-mail: [email protected] ¬
Mr. Wonder Boy
108 Webster Avenue
1004 Mount Zena,
NEW ZEALAND
E-mail: [email protected] ¬
becomes:
Mr. Wonder Boy
108 Webster Avenue
1004 Mount Zena,
NEW ZEALAND
E-mail: <a
href="Mailto:[email protected]"[email protected]</a>¬
Mr. Wonder Boy
108 Webster Avenue
1004 Mount Zena,
NEW ZEALAND
E-mail: <a
href="Mailto:[email protected]"[email protected]</a>¬
I was hoping to avoid replacetext and regEx as it will make it slow.
anyone have this already wired up?
thanks!
Sivakatirswami
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution