Data Loss Prevention

 View Only
  • 1.  Regex, Data Identifiers and date

    Posted Aug 09, 2017 09:29 AM

    Hello every one.

    Version of my DLP is 14.6

    I want to write new DI rule for date. I know. I know that regex language has limitations in DLP

    For check i used http://www.regexpal.com and https://regex101.com

    That is my rules

    (([012]?\d)|(3[01]))[\.\/\\]((0?[1-9])|(1[012]))[\.\/\\](19)?[4-9]\d
    or
    ([012]?\d|3[01])[\.\/\\](0?[1-9]|1[012])[\.\/\\](19)?[456789]\d

    But these did not work. Then I wrote more simple rule:

    [0123][0-9].[01][0-9].(19)?90 and this did not work to

    but if i use [0123][0-9].[01][0-9].1990 and this rule is working

    Data normalizer set to Degits And Letters

     



  • 2.  RE: Regex, Data Identifiers and date

    Trusted Advisor
    Posted Aug 10, 2017 12:32 AM

    AA,

    There are certain characters that are not suported in DI detection. In addiiton it is better to make a different Regex for each possibility. DO NOT try to make it all work in 1 statement.

    The '.' is considered as the wildcard.

    [0123][0-9].[01][0-9].1990

    This will work..

    I would recomend that you look at other DI's and see which characters work. (SSN, Cali DL)

    For example '|' will not work as an OR.

    Just create as many different variations of the Regex and put them in a different line.

    Try this in the meantime.

    [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

     

    PLEASE MARKED SOLVED IF POSSIBLE



  • 3.  RE: Regex, Data Identifiers and date

    Posted Aug 10, 2017 06:06 AM

    Thank you 

    this is my solution: 

    [012][0-9][\.\/\\][0-9][\.\/\\][4-9][0-9]
    01.1.45
    [012][0-9][\.\/\\]1[012][\.\/\\][4-9][0-9]
    01.11.45
    3[0-2][\.\/\\][0-9][\.\/\\][4-9][0-9]
    31.1.45
    3[0-2][\.\/\\]1[012][\.\/\\][4-9][0-9]
    31.11.45
    [012][0-9][\.\/\\]0[0-9][\.\/\\][4-9][0-9]
    21.01.45
    3[0-2][\.\/\\]0[0-9][\.\/\\][4-9][0-9]
    31.01.45
    [012][0-9][\.\/\\]1[012][\.\/\\][4-9][0-9]
    21.11.45
    3[0-2][\.\/\\]1[012][\.\/\\][4-9][0-9]
    31.11.45


    [012][0-9][\.\/\\][0-9][\.\/\\]19[4-9][0-9]
    01.1.1945
    [012][0-9][\.\/\\]1[012][\.\/\\]19[4-9][0-9]
    01.11.1945
    3[0-2][\.\/\\][0-9][\.\/\\]19[4-9][0-9]
    31.1.1945
    3[0-2][\.\/\\]1[012][\.\/\\]19[4-9][0-9]
    31.11.1945
    [012][0-9][\.\/\\]0[0-9][\.\/\\]19[4-9][0-9]
    21.01.1945
    3[0-2][\.\/\\]0[0-9][\.\/\\]19[4-9][0-9]
    31.01.1945
    [012][0-9][\.\/\\]1[012][\.\/\\]19[4-9][0-9]
    21.11.1945
    3[0-2][\.\/\\]1[012][\.\/\\]19[4-9][0-9]
    31.11.1945