Overview
This Plug-in exposes Java Regular Expression string manipulation capabilities as Appian Functions. Very useful for validation rules and data manipulation on interactive SAIL forms.
Key Features & Functionality
Datatypes provided:
Regex Flags supported:
Functions provided:
Hey Chris,
I'm trying to use regexReplaceAll() to escape the pattern string to make it safe for use with regexSearch().
Unfortunately, I can't seem to make regexReplaceAll() function work. I rather not use sustitute() function for each and every special characters in regular expression.
In function regexReplaceAll(), the replacement string doesn't seem to support the regular expression substitution syntax. I need to be able dynamically escape special characters and I can't seem to be able to dynamically escape characters I'm escaping.
Let me know if there is a way to get it to work in using your library. I'm trying to escape the usual suspects:
., +, *, ?, ^, $, (, ), [, ], {, }, |, \ (not including commas).
Also, I remember using the regular expression plugin twice in the last decade and I remember that version was more like the industry standard regular expression function behavior, similar to one implemented in Java. Am I wrong? Also, could it be possible to be more of a transparent call to how the regular expression works in Java?
Thanks.
I got it to work. Here's an excerpt of my code in case anybody else is interested in escaping their regular expression pattern using regexReplaceAll() function.
local!escapedPatternList: a!forEach( items: local!patternList, expression: fn!regexreplaceall( "([+-.\*?^$\(\)\[\]\{\}\|\\])", fv!item, "\\$1" ))