Okta Workflows Text - Replace Card Uses RegEx
Last Updated:
Overview
The Okta Workflows Text - Replace card uses Regular Expressions (RegEx) for search and replace functionality.
Using RegEx keywords without an escape character causes unexpected search results. Add a backslash escape character before the keyword to perform a literal search. When entering a RegEx keyword like a period, dollar sign, or caret without an escape character, Okta returns unexpected results instead of the literal character.
Applies To
- Okta Identity Engine (OIE)
- Okta Classic Engine
- Okta Workflows
- Text - Replace
- Regular Expression (RegEx)
Cause
Using RegEx keywords without an escape character prevents a literal search and provides unexpected results. Examples of keywords include . (any character), $ (end of string), and ^ (beginning of string).
Solution
How to perform a literal search with the Text - Replace card?
Use the RegEx escape character \ in front of the keyword.
For example, instead of using ., use \. to search for the literal . character instead of any character.
Review the following example flow to observe the difference between using a standard keyword and an escaped keyword for a literal search.
