Find and Replace Patterns or Characters in Text Using the "Replace" Text Helper

Keragon’s Replace Text Helper allows you to efficiently search for patterns, characters, or text strings and replace them with a new value. You can choose to replace just the first occurrence or all occurrences in the text. This is useful for data cleanup, formatting adjustments, and preparing text for further processing.

How to Use the Replace Text Helper

00:00: Learn how to efficiently find and replace patterns and characters and text using 00:04: the replace action in caragon. This helper action returns 00:08: a new string with one or all matches of a pattern replaced by a replacement 00:12: character or string. 00:15: First go to your workflow editor. 00:19: Click the plus icon. 00:22: Access the helpers menu. 00:25: Select the text helpers option. 00:28: Choose the replace action. 00:31: Click on the value field 00:34: Map the text string that you want to find and replace the patterns from in the value 00:38: field. 00:40: Place the pattern that you want to find and replace in the pattern field. 00:44: This can be a character a string or a regular expression. 00:49: Set the replacement filled with the new value to replace the pattern. 00:53: You can leave this field empty if you want to remove the pattern. 00:58: Select true or false in the replace only once filled if selected 01:02: true only the first occurrence will be replaced. 01:05: Otherwise, all occurrences will be replaced if false. 01:10: Save the changes made. 01:13: Proceed to the test step 01:16: Access the outputs tab 01:19: You can check the output there. 01:22: This guide covered the process of finding and replacing patterns and characters 01:26: in texts using the replace action feature in caragon.

  • Open your workflow editor.

  • Click the + icon to add a new step.

  • In the step selection panel, click "Helpers".

  • From the Helpers options, select "Text Helpers".

  • Choose the "Replace" action.

  • Click the Value field.

  • Use the Variable Selector to map the text value you want to modify.

  • Set the Pattern field with the character, string, or regular expression pattern you want to find and replace.

  • Set the Replacement field with the value you want to insert in place of the pattern. (Leave it empty if you want to remove the pattern.)

  • Select true or false in the Replace Only Once field:

    • True: Replaces only the first occurrence.

    • False: Replaces all occurrences.

  • Click "Save" to apply changes.

  • Click "Test Step" to preview the result.

  • Go to the Outputs tab to view the modified text.

Example Result:

  • Input: "apple, banana, apple"

  • Pattern: "apple"

  • Replacement: "orange"

  • Replace Only Once: false

  • Output: "orange, banana, orange"

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more