We can choose DLP for credit card using the existing template, However it doesn’t block only the credit card pattern, It can only identify if the email contains “Credit Card” & the credit card number (Example: Please find my credit card number #1231315354564654. I have recently got some requirement where customer wanted to block only the number, So we can achieve this through transport rule, Here is how.
To create this transport rule:
1. Login to Office365 ECP
2. Mail Flow, then Select “Rules”
3. Click +, Create new and follow as mentioned below in the screenshot.
For your convenience below is the pattern & you can choose any action as per your requirement, I have selected quarantine.
These patterns will block all below formats (Screenshot taken from quarantine mailbox)