Hello,
I'm looking to create an Incoming Mail filter to detect and mask credit card numbers. The requirements I was given are:
* Detect Credit Card numbers
* Mask the first 12 digits and leave the last 4 digits visible.
I'm able to mask the credit cards that have dashes included in the number but if the number doesn't contain dashes than the filter masks everything. I'm looking for some help and to see if any of you have run into similar requirements for your companies.
See filter I'm using:
CC:if true {
edit-body-text("[0-9]{16}", "XXXXXXXXXXXXXXXX");
edit-body-text("[0-9]{15}", "XXXXXXXXXXXXXXX");
edit-body-text("[0-9]{4}-[0-9]{4}-[0-9]{4}", "XXXX-XXXX-XXXX");
edit-body-text("[0-9]{4}-[0-9]{4}-[0-9]{4}", "XXXX-XXXX-XXXX");
edit-body-text("[0-9]{4} [0-9]{4} [0-9]{4}", "XXXX-XXXX-XXXX");
edit-body-text("[0-9]{4} [0-9]{4} [0-9]{4}", "XXXX-XXXX-XXXX");
notify ('user@domain.com');
}
.