Add an Escape function to the Text extension

By Rui Lopes on 23 Jun

Hi,

In order to build correct regular expressions, it is often necessary to escape reserved characters in the string to be searched. This is especially true when the string comes from a user-generated input (for example, the name of an email attachment). 

For this, the following C# method can be used:

  • Regex.Escape(String)

A similar method probably exists for the Java stack.

Regards,

Rui

Hi Rui.

I have created a forge component with that action: https://www.outsystems.com/forge/component/2007/text-and-html-processing/

The component does much more than that, but the action is RegexEscapePattern, and it works in Java too!