Data Loss Prevention

 View Only
  • 1.  Using Regex with custom data identifires.

    Posted Aug 07, 2017 12:02 PM

    Hi, I am using basic regular expressions such as to detect date of birth or numeric numbers using simple detection rules and that works fine. However, when I try to use the same in a custom data identifier, it never works. Is ther a perticular type/format of regex that works with custom DIs?

    Any assistance would b apprecaited. Thanks



  • 2.  RE: Using Regex with custom data identifires.

    Trusted Advisor
    Posted Aug 08, 2017 09:30 PM

    Mohammad..

    The DI's use a different type of Regex for detection. So if you are looking for '/' you may need to use the escape character before it '//' etc.. Also some of the Regex characteres will not work with DI's

    You will need to make sure that you also normalize the data ..

    Can you post what you have in your DI profile?

    Good Luck

    Ronak

     

    IF THIS SOLVES THE PROBLEM PLEASE MARKED SOLVED.



  • 3.  RE: Using Regex with custom data identifires.

    Trusted Advisor
    Posted Aug 08, 2017 10:14 PM

    DI pattern definition does not support full standard regexp definition. So If :

    - you are looking only for something fully describes by one pattern : use regexp rule

    - you are looking for something describes by more then one pattern or which coul dbe improved by adding a validator use DI (of course DI also provide you this capability to look for certain number of unique pattern which is really useful)

     as ronak wrote, if you can share your DI with forum member, they will be able to help you.



  • 4.  RE: Using Regex with custom data identifires.

    Trusted Advisor
    Posted Aug 08, 2017 10:58 PM

    Mohammad..

    Once imoportant think is to NOT use OR '|' statements in DI, just put other option on another line.

     

    Good Luck

    Ronak

    IF THIS SOLVES THE PROBLEM PLEASE MARKED SOLVED.



  • 5.  RE: Using Regex with custom data identifires.

    Posted Aug 09, 2017 02:38 PM

    Thank you all.. all of your comments were very helpful in heading into right direction. As I am using 14.5 my regex had to be PCRE compatible.. so when I tried the following regex in a custom DI.. it worked :)

     \d{2}-[a-z]{3}-\d{2}  

     

    I trust I need to follow similar syntax in future for it to work through DI.

     

    Thanks again..

     

     



  • 6.  RE: Using Regex with custom data identifires.

    Trusted Advisor
    Posted Aug 10, 2017 12:36 AM

    try this for the dates.

    You may need to change it depending on the date format dd/mm/yy or dd/mm/yyyy

    [0123][0-9].[01][0-9].19\d{2}

    [0123][0-9].[01][0-9].20[01]\d

    [0123][0-9]-[01][0-9]-19\d{2}

    [0123][0-9]-[01][0-9]-20[01]\d

    Good Luck

    Ronak

    IF THIS SOLVES THE PROBLEM PLEASE MARKED SOLVED.