Table of Contents

Search

  1. Preface
  2. Introduction to Dynamic Data Masking
  3. Rules
  4. Connection Rules
  5. Security Rules
  6. Security Rule Set Simulator
  7. Masking Functions
  8. Stored Procedure Result Set Masking
  9. Integration with Informatica Products
  10. XML Functions Reference
  11. Glossary

Regular Expression - Regex

Regular Expression - Regex

You can use regular expression to identify incoming SQL statements that match the criteria that you define for the matcher. A regular expression consists of character literals and metacharacters.
The Rule Engine uses metacharacters to determine the algorithm for processing regular expression characters. The Rule Engine matches each character at least one time.
To match multiple instances of a character in a regular expression, apply a quantifier or a repetition operator. For example, to find a match that starts with the letter
a
and ends with the letter
b
, use the following the regular expression:
^a.*b$
. The asterisk metacharacter repeats the preceding match for any metacharacter (.) zero, one, or more times. If you want to use the like character to define the same pattern, use
a%b
with the percent sign to indicate zero, one, or multiple occurrences of any character.
The following table describes the regular expression metacharacters that you can use with Dynamic Data Masking:
Expression
Description
\t
Indicates a tab character.
\n
Indicates a new line.
.
Matches any character except for new lines.
|
Indicates the expression on the left or right side matches the target string.
[ ]
Defines the enclosed characters that can match the target character. For example, the expression
[ab]
matches the letters a and b. The expression
[0-9]
matches any digit.
[^]
Indicates that the enclosed characters do not match the target character. For example,
[^ab]
matches all characters except "a" and "b."
[^0-9]
matches any character that is not a digit.
*
Indicates that the character to the left of asterisk in the expression will match zero or more times. For example,
be*
matches "b," "be," and "bee."
+
Indicates that the character to the left of the plus sign matches one or more times. For example,
be+
matches
be
and
bee
, but not
b
.
?
Indicates that the character to the left of question mark in the expression matches zero or one time. For example,
be?
matches
b
and
be
, but not
bee
.
^
Indicates that the expression to the right of
^
matches when
^
is at the beginning of a line. For example,
^A
matches an
A
at the beginning of a line.
$
The expression to the left of
$
matches when
$
is at the end of a line. For example, the expression
e$
matches the letter
e
that is at the end of a line.
( )
Defines tagging and the processing order of expressions.
\
Indicates an escape character. Use double backslashes to view the backslash character.
\Q
Indicates the start of a quoted expression. The parser ignores special characters.
\E
Indicates the end of a quoted expression.
\S
Defines a separator for space, tab, or new line.