Editorial Workflows

Find & Replace (Popover)

public workflow

Install Workflow

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: Find occurrences of a regex in the document and ask for each one, whether it should be replaced (using a popover).

Shared by: http://www.macdrifter.com/2013/09/editorial-workflow-find-and-replace-with-confirmation.html

Comments: Comment Feed (RSS)

Tunde — 19 Dec 2014
I write to you because of the workflow you shared. I hope you will be able to help me. In essence, I have lots of text like that below. The first line of the paragraphs contain a percentage and a colon (eg 16.7%:). I want a workflow that removes it (the percentage and colon). See below - before the hoped for work flow AND after using the workflow.

Below see Text before workflow processing

16.7%:
This view is no longer tenable against the background of the increased
awareness of investors of the implications of bid situations

96.7%:
This Rule shall not apply in a case


Now see the above Text after workflow processing

This view is no longer tenable against the background of the increased
awareness of investors of the implications of bid situations

This Rule shall not apply in a case

+ Add Comment

Workflow Preview
Set Variable ?
Variable Name
Offset
Value
0
Request Text Input ?
Title
Find (RegEx)
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
Pattern
Value
Input
Request Text Input ?
Title
Replace with
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
Replacement
Value
Input
Count ?
What to Count:
  • Words
  • Sentences
  • Lines
  • Characters
Set Variable ?
Variable Name
Repl. Length
Value
Input
Document Text ?
Folded Text
  • Include
  • Replace with:
Repeat… ?
Repeat with
  • Every Line
  • Every Match of Regular Expression:
Pattern
Match Group
0 (entire match)
Reverse
OFF
Select Range ?
Range (from:to)
Offset+%repeat:range+Offset
Relative to
  • Entire Document
  • Current Selection
Select from List ?
Title
Replace this?
List (Lines)
Replace Skip
Multiple Selection
OFF
Show in Popover
ON
If… ?
Run the block if
Input
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Replace
Selected Text ?
Entire Line(s)
OFF
Empty Selection Output
  • No Output
  • All Text
  • Closest Word
Folded Text
  • Include
  • Replace with:
Count ?
What to Count:
  • Words
  • Sentences
  • Lines
  • Characters
Math ?
Expression
Offset+Repl. Length-Input
On Error
  • Stop Workflow
  • Output "ERROR"
Result
  • Pass to Next Action
  • Store in Variable:
Offset
Replace Selected Text ?
Replacement Text
Replacement
…End If
…End Repeat