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:
https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/78/2502.Pic2.jpg
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:
https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/78/4265.Pic4.jpg
Example 2 :
Consider the following pattern matching rule for an Employee Code that shows optional matching:
https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/45/78/0825.Pic5.jpg
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