Jblz619 Posted December 28, 2017 Share Posted December 28, 2017 Hi I would like to replace the tab and unknown white space characters with space. Using StringReplace $var=Kvcbao Hcfgfer 555-555-1498 N5kaujgnhg6hhli35@gmail.com I know how to use stringreplace but I can't figure out how to replace the tab with space and I don't know what type of space is used between the number and the email. Link to comment Share on other sites More sharing options...
Jblz619 Posted December 28, 2017 Author Share Posted December 28, 2017 Really what i want to do is just break the variable up into an array of 4. With stringsplit but once again I can't identify the delimiter. When I copy and paste the delimiter I want from note pad it's just appears as a space " " in the autoit script. Tab as well apears as space. Link to comment Share on other sites More sharing options...
funkey Posted December 28, 2017 Share Posted December 28, 2017 #include <StringConstants.au3> Local $var = "Kvcbao Hcfgfer 555-555-1498 N5kaujgnhg6hhli35@gmail.com" Local $var_new = StringStripWS($var, $STR_STRIPSPACES) MsgBox(0, "", $var_new) Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
mikell Posted December 28, 2017 Share Posted December 28, 2017 You might directly parse your string to get an array of non-whitespace chars sequences #include <StringConstants.au3> #Include <Array.au3> $var = "Kvcbao Hcfgfer 555-555-1498 N5kaujgnhg6hhli35@gmail.com" $res = StringRegExp($var, '\S+', $STR_REGEXPARRAYGLOBALMATCH) _ArrayDisplay($res) 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