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. Appendix A: XML Functions Reference
  11. Appendix B: Glossary

User Guide

User Guide

Capturing Groups That Rewrite or Search and Replace

Capturing Groups That Rewrite or Search and Replace

You can use line terminators and capturing groups to rewrite or search and replace expressions.
You can use parentheses to enclose tagged expressions to indicate a capturing group. Then, you can use
\0
,
\1
,
\2
, and
\3
to reference tagged expressions. The expression \0 indicates a tagged expression that represents the entire substring that was matched. The expression
\1
denotes the first tagged expression,
\2
is the second expression, and
\3
is the third expression.
The following table describes how you can use capturing groups and line terminators to rewrite or search and replace text:
Original
Search
Replace
Result
abc
(ab)(c)
\0-\1-\2
abc-ab-c
abc
a(b)(c)
\0-\1-\2
abc-b-c
abc
(a)b(c)
\0-\1-\2
abc-a-c