Regular Expression Functions

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:

  • RegexMatch - has a string field representing the string found, a starting index for the string in the haystack and an ending index for the string in the haystack

Regex Flags supported:

  • i - case insensitive
  • g - find all matches
  • m - multiline search
  • s - treats the entire string as a single line
  • u - unicode aware search
  • x - ignores comments starting with '#' and white spaces
  • d - enables unix line mode

Functions provided:

  • regexSearch - Searches for the selected pattern with the specified regex options and returns a list of RegexMatch Datatypes, accepts all regex flags.
  • regexArraySearchIndexOfFirstMatch - Searches an array for a match and returns the first index of match found
  • regexMatch - Indicates whether the regular expression finds a match in the input string, accepts all regex flags.
  • regexInsertMatchMarkers - Finds the match or matches and surrounds them with starting and ending markers, accepts all regex flags.
  • regexFirstMatch - Returns the first match of the regular expression within the input string, accepts all regex flags except 'g'.
  • regexAllMatches - Returns all matches of the regular expression within the input string, accepts all regex flags.
  • regexReplaceAll - Replaces all matches of the regular expression within the input string
Anonymous
Parents
  • Hi Chris,

    First of all, thanks for your plugin, it is very useful.

    Just one question, when we use the plugin, we notice that we have a lot of data in the Appian Log due to the plugin, I suppose that you have in the code a System.out.println.

    I don't know if that behaviour is correct, but I think a good practice is to avoid writing directly in log. Maybe, in case you want to add info into the log, you can add a new param like "activeLog" true or false.

    Do you think that we could have that behaviour or maybe to avoid the insertion into log?

    Regards 

Comment
  • Hi Chris,

    First of all, thanks for your plugin, it is very useful.

    Just one question, when we use the plugin, we notice that we have a lot of data in the Appian Log due to the plugin, I suppose that you have in the code a System.out.println.

    I don't know if that behaviour is correct, but I think a good practice is to avoid writing directly in log. Maybe, in case you want to add info into the log, you can add a new param like "activeLog" true or false.

    Do you think that we could have that behaviour or maybe to avoid the insertion into log?

    Regards 

Children