Workflow Example: Text [Switching Tabs & Spaces]

This workflow demonstrates a simple way to use a find and replace to switch between using tabs and spaces. This is a common requirement for people working with scripting languages to keep code neatly formatted and whilst the numbers used here are not typical, they do help illustrate the work done.

The workflow uses a simple regular expression using the “\t” for tab token and plain old spaces.

When the workflow is run it copies the result to the clipboard. In Workflow, the standard outputs use non-monospaced fonts so it can be difficult to review the output. Instead I suggest pasting it into a text editor (such as Drafts) to review.

Tags: | workflow |