Delete empty spaces at the start of a sentence in Clipboard value

Dears,

I am copying to the system clipboard some text that has 4-5 spaces at the beginning of it, and I would like to remove those spaces before I paste the text again.

I did find this post which I think is the solution to my issue, however, due to my limited programming knowledge, I am not sure how to adapt the approach so that it simply removes only the spaces at the beginning of a sentence.

Any help would be much appreciated.

Thank you,
Rosario

Try the Filter action and select the Trim Whitespace option.

3 Likes

What I have missed to mention is that it is not just one word with white space at the beginning, it is a full sentence, so the text does contain other white spaces, I am not at home right now and canβ€˜t test the Trim Whitespace function. Will do as soon as I get home, will I be able to define which white spaces should be trimmed?

I.e. Trim only the white spaces at the beginning of the text.

Trim means remove leading and trailing space – start of text and end of text.

( Spacs between words in the middle of the text are not affected )

1 Like

I knew I should have just waited to come home and test it out.

Thank you guys, that did it :slight_smile:

1 Like

I've clarified Trim Whitespace on the Filters Wiki Page.

Take Care,
Chris

(Keyboard Maestro Moderator)

1 Like