0
 Followers
4
 Likes

Add an Escape function to the Text extension

System Components
On our radar

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

Created on 23 Jun 2017
Comments (1)

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!

views
232
Followers
0