diego.gozer Posted August 29, 2016 Posted August 29, 2016 Hi Guys I work with a software that I need always copy from it and past somewhere else. I have a problem with it since it has a lot of unwanted spaces. For example: "My text has a lot of spaces" I would like some workflow that removes all spaces from text except for single spaces between words. In my example would be like that: "My text has a lot of spaces" Basically equal to the function TRIM on Microsoft Excel, I don't have experience with code, so I really appreciate some help.
deanishe Posted August 29, 2016 Posted August 29, 2016 Use a Run Script Action with Language = /usr/bin/python with input as argv Script: import re import sys print(re.sub(' +', ' ', sys.argv[1]))
diego.gozer Posted September 29, 2016 Author Posted September 29, 2016 Thank you, both answers helped a lot
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