Photo Gallery
Member List
Search
Calendars
FAQ
Ticket List
Log Out
Forums
Register
Login
My Profile
Inbox
Address Book
My Subscription
My Forums
strip usernames from email/domain logins
Logged in as: Guest
arrSession:exec spGetSession 2,16,26908
Active Users: There are
0
members and
0
guests.
Users viewing this topic: none
Printable Version
All Forums
>>
[Scripting]
>>
Post a VBScript
>> strip usernames from email/domain logins
Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page:
[1]
Login
Message
<< Older Topic
Newer Topic >>
strip usernames from email/domain logins -
10/13/2005 8:16:09 AM
kirrilian
Posts: 628
Score: 3
Joined: 3/15/2005
From:
Status:
offline
strip usernames from email/domain logins
Function flyapart(input) 'breaks up email addys and domain logins of all types 'format = domain\username Or username@some.domain.com If InStr(input, "\") > 0 Then domain = lcase(Left(input, InStr(input, "\") - 1)) rmEmail = (Len(input)-InStr(input, "\")) strUserName = lcase(Right(input, rmEmail)) Elseif InStr(input, "@") > 0 Then rmEmail = (Len(input)-InStr(input, "@")+1) strToReplace = Right(input, rmEmail) quickArray = Split(strToReplace, ".") strUserName = lcase(Replace(input, strToReplace, "")) domain = LCase(Replace(quickarray(0), "@", "")) Else WScript.Echo "That isnt valid input" End If End Function 'flyapart
_____________________________
Have you searched
here
?
VBScript Fundamentals
My Site
Post #: 1
If you found our site useful please link to us
<a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>
.
All Forums
>>
[Scripting]
>>
Post a VBScript
>> strip usernames from email/domain logins
Page:
[1]
Jump to:
Select a Forum
All Forums
----------------------
[Welcome]
- - Forum Rules
- - Test Posting Messages
- - New Member Area/Introduction
[Scripting]
- - WSH & Client Side VBScript
- - WSH & Client Side VBScript Tutorial
- - Post a VBScript
- - Windows PowerShell
- - ASP
- - ASP.NET
- - Windows Script Components
[General Forum]
- - Other Programming/Scripting Languages
- - Suggestions & Feedback
- - Off-Topic Lounge
New Messages
No New Messages
Hot Topic w/ New Messages
Hot Topic w/o New Messages
Locked w/ New Messages
Locked w/o New Messages
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
Forum Software ©
ASPPlayground.NET
Advanced Edition
2.5.5 ANSI