Tormiasz Posted June 26, 2014 Share Posted June 26, 2014 Hello! I have this code: $aFile = StringRegExpReplace($aFile, " = ", "=") ; Delete non-needed spaces $aFile = StringRegExpReplace($aFile, " - ", "-") ; Delete non-needed spaces $aFile = StringRegExpReplace($aFile, " / ", "/") ; Delete non-needed spaces $aFile = StringRegExpReplace($aFile, " + ", "+") ; Delete non-needed spaces Is there any fast way to make it just into one command? Greetings Link to comment Share on other sites More sharing options...
mikell Posted June 26, 2014 Share Posted June 26, 2014 (edited) $aFile = "aaa = bbb / ccc+ ddd - eee" $aFile = StringRegExpReplace($aFile, '\s*([=/+-])\s*', "$1") ; Delete non-needed spaces Msgbox(0,"", $aFile) But you should have a look at StringStripWS Edited June 26, 2014 by mikell 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