Home
%3CLINGO-SUB%20id%3D%22lingo-sub-388103%22%20slang%3D%22en-US%22%3EPattern%20Matching%20in%20DQS%20Domain%20Rules%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-388103%22%20slang%3D%22en-US%22%3E%0A%20%26lt%3Bmeta%20http-equiv%3D%22Content-Type%22%20content%3D%22text%2Fhtml%3B%20charset%3DUTF-8%22%20%2F%26gt%3B%3CSTRONG%3E%20First%20published%20on%20MSDN%20on%20Oct%2008%2C%202012%20%3C%2FSTRONG%3E%20%3CBR%20%2F%3E%3CP%3EThis%20post%20provides%20you%20information%20on%20how%20to%20use%20the%20pattern%20matching%20rules%20in%20DQS%20while%20creating%20domain%20rules.%20These%20are%20the%20four%20pattern%20matching%20rules%20in%20DQS%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F99780i27F34B9809E26079%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EFor%20a%20pattern%20matching%20rule%3A%3C%2FP%3E%3CBR%20%2F%3E%3CUL%3E%3CBR%20%2F%3E%3CLI%3EAny%20%26nbsp%3Bletter%20(A%E2%80%A6Z)%20%26nbsp%3Bcan%20be%20used%20as%20a%20pattern%20for%20any%20letter%3B%20case%20insensitive%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EAny%20digit%20(0%E2%80%A69)%20can%20be%20used%20as%20a%20pattern%20for%20any%20digit%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EAny%20special%20character%2C%20except%20a%20letter%20or%20a%20digit%2C%20can%20be%20used%20as%20a%20pattern%20for%20itself%3C%2FLI%3E%3CBR%20%2F%3E%3CLI%3EBrackets%2C%20%5B%5D%2C%20define%20optional%20matching%3C%2FLI%3E%3CBR%20%2F%3E%3C%2FUL%3E%3CBR%20%2F%3E%20%3CB%3EExample%201%20%3C%2FB%3E%20%3A%20%3CBR%20%2F%3E%3CP%3EConsider%20the%20following%20pattern%20matching%20rule%20to%20represent%20Employee%20Code%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F99781i220FEF0878576685%22%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FMSDNBlogsFS%2Fprod.evol.blogs.msdn.com%2FCommunityServer.Blogs.Components.WeblogFiles%2F00%2F00%2F01%2F45%2F78%2F2502.Pic2.jpg%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3C%2FA%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThis%20rule%20implies%20that%20the%20Employee%20Code%20will%20contain%20three%20parts%3A%20%3CEM%3E%20any%20three%20%3C%2FEM%3E%20letters%20followed%20by%20a%20colon%20(%3A)%2C%20which%20is%20again%20followed%20by%20%3CEM%3E%20any%20four%20%3C%2FEM%3E%20digits.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIn%20this%20case%2C%20following%20are%20some%20%3CSTRONG%3E%20valid%20%3C%2FSTRONG%3E%20values%20as%20per%20the%20rule%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F99782i804017FC55221F49%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAnd%2C%20following%20are%20some%20%3CSTRONG%3E%20invalid%20%3C%2FSTRONG%3E%20values%20as%20per%20the%20rule%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F99783iBC9031CB12941504%22%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FMSDNBlogsFS%2Fprod.evol.blogs.msdn.com%2FCommunityServer.Blogs.Components.WeblogFiles%2F00%2F00%2F01%2F45%2F78%2F4265.Pic4.jpg%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3C%2FA%3E%3C%2FP%3E%3CBR%20%2F%3E%20%3CB%3EExample%202%20%3C%2FB%3E%20%3A%20%3CBR%20%2F%3E%3CP%3EConsider%20the%20following%20pattern%20matching%20rule%20for%20an%20Employee%20Code%20that%20shows%20optional%20matching%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F99784i28216428F5FCE1E3%22%20%2F%3E%20%3CA%20href%3D%22https%3A%2F%2Fmsdnshared.blob.core.windows.net%2Fmedia%2FMSDNBlogsFS%2Fprod.evol.blogs.msdn.com%2FCommunityServer.Blogs.Components.WeblogFiles%2F00%2F00%2F01%2F45%2F78%2F0825.Pic5.jpg%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20%3C%2FA%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThis%20rule%20implies%20that%20the%20Employee%20Code%20will%20contain%20three%20parts%3A%20%3CEM%3E%20any%20three%20%3C%2FEM%3E%20letters%20followed%20by%20a%26nbsp%3Bhyphen%20(-)%2C%20which%20is%20again%20followed%20by%20%3CEM%3E%20any%20four%20or%20five%20digits%20%3C%2FEM%3E%20.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EIn%20this%20case%2C%26nbsp%3Bfollowing%20are%20some%20%3CSTRONG%3E%20valid%20%3C%2FSTRONG%3E%20values%20as%20per%20the%20rule%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F99785i56E85F90E4368B7D%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EAnd%20the%20following%20are%20some%20%3CSTRONG%3E%20invalid%20%3C%2FSTRONG%3E%20values%20as%20per%20the%20rule%3A%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F99786iC676433066919A0B%22%20%2F%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EThanks%2C%20%3CBR%20%2F%3E%20DQS%20Team%3C%2FP%3E%0A%20%0A%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-388103%22%20slang%3D%22en-US%22%3EFirst%20published%20on%20MSDN%20on%20Oct%2008%2C%202012%20This%20post%20provides%20you%20information%20on%20how%20to%20use%20the%20pattern%20matching%20rules%20in%20DQS%20while%20creating%20domain%20rules.%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-388103%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Edata%20quality%20services%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Edomain%20rules%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Edqs%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Epattern%20matching%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Not applicable
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