Text Filtering and Replace with Keyboard Maestro

Along with many other features, Keyboard Maestro has some solid text Filtering features. You can combine this with Search and Replace to strip formatting and clean text. If it’s extensive, I hand this task over to TextSoap, but Keyboard Maestro has quite a few tricks to work with.

For example, the Filter block has some built in ways to clean text. As an example, there is:

Remove Styles (Convert to Plain Text)
Trim Whitespace
Uppercase
Lowercase
Capitalize
Zap Control Characters
Word Count
And several others.
Keyboard Maestro has several text formatting and conversion options built in

The Search and Replace block can replace words as well as use Regular Expressions. This can be used to remove Tab, CRLF, and other characters that Filter may miss.

I used this for a variety of tasks. The obvious is stripping out characters or making sure everything is lowercase. I’ve also taken Katalon Studio comments and stripped out the // and /* blocks so I could use my comments in documentation.

Another use has been a macro to convert JIRA tickets into a task list. I copy the text, then use Keyboard Maestro to strip out extraneous characters.

If you have a big conversion/formatting task, TextSoap is the way to go. But, if you have some quick formatting needs, Keyboard Maestro has some nice features ready to help you.

The main reason I bring it up, the Filter option wasn’t clear to me. I spent time writing RegEx statements without seeing there were built-in features.

You can read more at:
https://wiki.keyboardmaestro.com/action/Filter

<Festive>
Author Signature for Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.