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
  • I notice you've recently upversioned this plugin. IA number of our clients use this plugin, and have done for quite a few years, so renaming the existing functions (and therefore preventing backwards compatibility) means they will have to rework every call to any of the functions contained within the plugin.Is there a reason the original functions were renamed?

  • Hi , 

    The reason I renamed the functions was simply to allow people to call the old versions of the functions. You are correct though, I'll fix the backward compatibility. As for the regexIsMatch vs regexmatch; it should have been regexmatch, the underlying function has a different name so that was a typo.

  • Hi ,

    The new version's been listed. The typo in regexMatch has been fixed, and the regexFlags is optional and default to the values used behind the scenes in version 1.0, so you should be able to use those functions again without changes.

Comment
  • Hi ,

    The new version's been listed. The typo in regexMatch has been fixed, and the regexFlags is optional and default to the values used behind the scenes in version 1.0, so you should be able to use those functions again without changes.

Children
No Data