Guide

How to Use Text Find & Replace Rules

Enter the text and an ordered list of find-and-replace rules, then run the operation to receive updated text. Use literal matching for ordinary wording or regex mode for deliberate pattern matching.

Tool Text Find & Replace

What the tool does

Text Find & Replace changes supplied text by applying find-and-replace rules in the order you provide. It supports literal matching for ordinary wording and optional regular-expression matching for pattern-based changes.

Rule order affects the result because each successfully processed rule updates the current text before the next rule runs. Literal matching ignores letter case by default, while a rule can be made case-sensitive when capitalization needs to matter.

Set up the replacement

  1. Enter the text you want to modify. Text is optional: an empty or omitted value produces empty output and zero applied rules, and the tool does not process the supplied rules in that situation.

  2. Add the rules in the sequence you want them applied. For each rule, enter the value to find and the replacement value. Keep regular-expression mode off when the find value should be treated as ordinary text.

  3. Check the matching setting for each literal rule. Literal matching is case-insensitive unless that rule is set to case-sensitive, so a find value can match capitalization variants unless you change the setting.

  4. Turn on regular-expression mode when the find value is intentionally a pattern rather than plain text. Regex matching is case-insensitive by default and becomes case-sensitive when the setting is enabled for that rule.

  5. Check the rule collection before running the operation. A find value that is empty or omitted is skipped and does not count as applied. If the text is non-empty and rules are omitted or null, they are treated as an empty list; a non-null rules value that is not a list is rejected.

  6. Run the replacement and inspect the updated text, the applied-rule count, and reported rule errors. With several rules, assess each later change against the text produced by the earlier rules rather than against the original input.

Read the outcome

The returned text reflects the rules that were successfully processed in list order. The applied-rule count excludes rules with an empty or omitted find value, so a lower count can indicate a skipped rule rather than an unchanged replacement.

An invalid regular expression is not applied, and an error is collected for that rule while processing continues. The overall call still reports success, making the error information important when deciding whether the resulting text is ready to use.

For a straightforward wording change, literal mode gives the find value its ordinary-text meaning. Choose regex mode only when a pattern is intended, and review case sensitivity separately for each rule.

Worked example

A support team wants to change the label “Order ID” to “Order Reference” in a short customer-service note.

Enter a customer-service note, add one literal rule that finds “ID” and replaces it with “Reference,” leave regex mode off, and run the operation.

The result contains updated text, an applied-rule count, and collected rule errors. The literal rule can count as applied, while no regex error is expected for this action.

Limitations

  • The result can depend on rule order, while an invalid regex is skipped and does not prevent an overall successful call.

Common errors

  • Cause: a non-null rules value is supplied in a form other than a list while the text is non-empty. Correction: place the replacement rules in a list before running the operation.

FAQ

What happens if I leave the text or rules blank?

If the text is empty or omitted, the result is empty output with zero applied rules, and supplied rules are not processed. If the text is non-empty, omitted or null rules are treated as an empty list.

Can I use regular expressions for replacement?

When regex mode is enabled for a rule, its find value can be used as a regular expression. Matching is case-insensitive by default, with case-sensitive matching available for that rule.

What happens when a regular-expression rule is invalid?

If the pattern is invalid, that rule is skipped and its error is collected while later processing continues. The overall call still reports success, so correct the pattern after reviewing the reported error.

Tool

Text Find & Replace