You could also use Left
<CFSET strEmail = "[EMAIL PROTECTED]">
<CFSET Index = Find("@", strEmail)>
<CFSET strEmailPart = Left(strEmail, Index)>
The reason taht works is because you know where your
string starts, if you were searching for emails as a
sub string, of a larger string a regular expression
would most likely be more suited to your needs.
Jeremy Allen
[EMAIL PROTECTED]
[Insert cool title here]
-----Original Message-----
From: Andrew [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 11, 2000 10:03 PM
To: [EMAIL PROTECTED]
Subject: Re: Working with a string...
Gary:
I would do a Find on the string for the @ and then a Mid function that
starts at 1 and ends at the position returned from the find function.
Andrew Hewitt
Web Application Developer
webworld studios inc.
----- Original Message -----
From: "Gary McNeel, Jr." <[EMAIL PROTECTED]>
To: "Cf-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 11, 2000 7:06 PM
Subject: Working with a string...
> I have an email address sting that I need to manipulate.
>
> I need to just get the first part before the @ symbol and discard the rest
> (although knowing how to grab it might be useful too). Is the only way to
do
> a regular expression?
>
> Ex. [EMAIL PROTECTED] would become gmcneel (maybe in a variable).
>
> TIA
>
> Gary McNeel, Jr.
> Project Manager - DAC-Net, Research & Graduate Studies
> Rice University - Houston
> [Lovett Hall] 713-348-6266 (Primary)
> [DAC] 713-348-5184
> [M] 713-962-0885
> [H] 713-723-9240
> http://dacnet.rice.edu/DAC-Net/Staff/Gary/
>
> "Great spirits have always encountered violent opposition from mediocre
> minds."
> -Albert Einstein
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.