← Back to plugin index

Value Transformation

Description
The value transformer transforms a value with a regular expression (regex). Specifically, it searches for the specified pattern and replaces all matches with the replacement string (using the method replaceAll(replacement)).
Type name
ValueTransformation
Class
com.airlock.iam.core.misc.impl.sso.ValueTransformation
May be used by
Properties
Regex (regex)
Description

Regular expression to match the input value or part of it. The expression '(.+)' matches the whole string and saves it as a group which can be referenced as '$1' in the replacement expression.
Notice: To match any string, always use "(.+)", and never "(.*)" since the latter also matches against the empty string and thus the replacement will be applied twice.

Examples:
  • To add the prefix 'IAM_', use Regex='^(.+)$' and Replacement='IAM_$1'.
  • To remove all whitespace from the value, use Regex='\s' and Replacement=''.
  • To remove the domain part of an email address, use Regex='@.*$' and Replacement=''.
Attributes
RegEx
Mandatory
Replacement (replacement)
Description
The expression to replace the matched text with. The first matching group of the regex is denoted '$1'.
Attributes
String
Optional
YAML Template (with default values)

type: ValueTransformation
id: ValueTransformation-xxxxxx
displayName: 
comment: 
properties:
  regex:
  replacement: