This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DLP Expressions

hi,

Does anyone have an example of expression to block bank data and CNPJ (Tax code)  number in the DLP policy?

I'm trying the following expressions, but not working.

(\d{2}[-.\s]?\d{3}[-.\s]?\d{3}[-.\s\/]?\d{4}[-.\s]?\d{2})

[0-9]{4}\-[0-9]$

Best regards.



This thread was automatically locked due to age.
  • Hi There, 

    Thank you for reaching us about this, You may refer to this documentation on setting up an expression for DLP. Also for further assistance, you may reach to your Account manager as this is a customize set-up that is already out of our support scope.

    Glenn ArchieSeñas (GlennSen)
    Global Community Support Engineer

    The New Home of Sophos Support Videos!  Visit Sophos Techvids
  • Hello Rafael Silva Ferreira,

    first of all, it's not clear whether your rule uses one custom CCL or two,  what your documents contain, and what not working means - I assume it's not blocking.

    Your first expression matches not only a CNPJ but any sequence of 14 digits possibly interspersed at certain positions with punctuation or white space - and it does not consider the fact that the last two digits are check digits. Perhaps not impossible to do with a regex but infeasible  Can't say why there is no predefined CCL for this like for CAEPF and CPF.
    And the purpose of your second expression is not really clear.

    Christian

  • Hi

    I usually use https://regexr.com/ to create regular expression with PCRE

    Test this regular expression and see if works for your purposes.

    \b(\d{3}\.?\d{3}\.?\d{3}\-?\d{2}|\d{2}\.?\d{3}\.?\d{3}\/?\d{4}\-?\d{2})\b

  • Hi Glenn,

    Probably more to the point is why are the XG content filter choices so limited when compared to the UTM?

    Ian

    XG115W - v20.0.2 MR-2 - Home

    XG on VM 8 - v21 GA

    If a post solves your question please use the 'Verify Answer' button.