Blog Post

SQL Server Integration Services (SSIS) Blog
1 MIN READ

Pattern Matching in DQS Domain Rules

SSIS-Team's avatar
SSIS-Team
Copper Contributor
Mar 25, 2019
First published on MSDN on Oct 08, 2012

This post provides you information on how to use the pattern matching rules in DQS while creating domain rules. These are the four pattern matching rules in DQS:



For a pattern matching rule:



  • Any  letter (A…Z)  can be used as a pattern for any letter; case insensitive

  • Any digit (0…9) can be used as a pattern for any digit

  • Any special character, except a letter or a digit, can be used as a pattern for itself

  • Brackets, [], define optional matching


Example 1 :

Consider the following pattern matching rule to represent Employee Code:



This rule implies that the Employee Code will contain three parts: any three letters followed by a colon (:), which is again followed by any four digits.


In this case, following are some valid values as per the rule:



And, following are some invalid values as per the rule:



Example 2 :

Consider the following pattern matching rule for an Employee Code that shows optional matching:



This rule implies that the Employee Code will contain three parts: any three letters followed by a hyphen (-), which is again followed by any four or five digits .


In this case, following are some valid values as per the rule:



And the following are some invalid values as per the rule:



Thanks,
DQS Team

Updated Mar 25, 2019
Version 2.0
No CommentsBe the first to comment