michaelslamet Posted June 4, 2010 Share Posted June 4, 2010 I have a string that can contain a email address, 2 email address(es) or even 3 email address(es) this is the example of the string: abc@abc.com or abc@abc.com / xyz@xyz.com or abc@abc.com / xyz@xyz.com, aaa@aaa.com A character that separate those address(es) is either / , or ; How the separate them into $email_adress[1], $email_address[2], $email_address[3]? I know that StringRegExp should do, but... how? Thanks a lot!! Link to comment Share on other sites More sharing options...
Spiff59 Posted June 4, 2010 Share Posted June 4, 2010 (edited) StringSplit will work for you. Something like: #include <array.au3> $string = "paul, bob; jack/bill" $array = StringSplit($string,",;/") _ArrayDisplay($array) For $x = 1 to $array[0] $array[$x] = StringStripWS($array[$x], 3) Next _ArrayDisplay($array) Edit: Added the StringStripWS() loop, which you may or may not need. Edited June 4, 2010 by Spiff59 Link to comment Share on other sites More sharing options...
michaelslamet Posted June 4, 2010 Author Share Posted June 4, 2010 Test it just now, works like a charm!! Thats a lot, Spiff59, you rocks!! Thanks again!! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now