Saturday, July 4, 2020

#1 2002-04-29 12:13:42 am

Trash Man
Sanitation Department
Registered: 2005-10-20
Posts: 5336

How do I get everything after the @ sign on emails

Rob , Marc, terribly sorry about that. I deleted the message because I thought it was kind of stupid of me. I finished the applescript that i was making that caused that question. Terribly sorry. Can I ask your help on another problem though? I am in the process of writing an apple script that reads a file, sorts the information in it into groups and saves each group into a file. I was trying to sort email addresses by domain name, but I don't quite have the manipulation part down. How would I retrieve the domains ( or rather, every thing after the @ sign) in an email address? Kinda like having the apple script sort every emails it has in memory by ou.edu, just because it found 1 that ended in @ou.edu.


One mans trash is another mans treasure

Offline

 

#2 2002-04-29 12:42:26 am

Rob
Member
From:: Ohio, USA
Registered: 2002-11-20
Posts: 1886

Re: How do I get everything after the @ sign on emails

Well, here's a quick example of a way to extract the domain from an email address.

Applescript:

set theAddress to "miragegames@hotmail.com"
set theDomain to text ((offset of "@" in theAddress) + 1) thru end of theAddress
display dialog theDomain

Rob (who answered quickly so that the answer would arrive before the question disappeared) ;-)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)