Scramble characters by regular expression

The scramble characters by regular expression policy masks a string by randomly changing the order of the characters in the string. The policy uses a regular expression to determine which characters to mask in the string.

JavaScript policy syntax

This policy is available with the function ScrambleMask.scrambleCharactersByRegularExpression().

ScrambleMask.scrambleCharactersByRegularExpression(record.getItem( '<arg.inputAttribute'), <arg:regularExpression>)

For example, to swap the lowercase characters from a-h, enter the following syntax:

ScrambleMask.scrambleCharactersByRegularExpression(record.getItem('/DEMO/ORDERS/ORDER_ID'), '([a-h]+)')

Argument Description
inputAttribute The attribute containing the string to mask.
regularExpression A regular expression describing the characters to mask in the input string.