Search
Saturday
Sep122015

Workflow Example: Split Characters onto New Lines

This workflow shows how text can be split to place each character on a new line. It demonstrates this using two methods, a new line not currently being possible to add into the Replace action as a replace parameter. When run the user is prompted to select one of the methods using a menu action.

The first method takes a text action containing a new line and stores this in a variable. That variable can then be used in the replace action to replace each character with the character and the content of the variable (a new line). Note that the replace makes use of a regular expression.

The second method carries out a similar replacement, but this time using some placeholder text ("[character]"). That placeholder is then used as a custom separator for the Split Text action which separates each character into a separate element. These elements are then recombined using a new line separator with the Combine Text action.

The results are then displayed via a Quick Look action for verification and sharing.

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>