Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Cohesity Alta SaaS Protection Administrator's Guide
  3. Configure Tagging policies
  4. Adding regular expressions
  5. RegEx and query examples for PII detection
Cohesity Alta SaaS Protection Administrator's Guide

RegEx and query examples for PII detection

Use the following examples to query data.

Table: RegEx and query examples for PII detection

Data

Use RegEx type:

To find MasterCard numbers without spaces (for example, 5500000000000004)

Single Term Regexp

To find MasterCard numbers that might have spaces or dashes (for example, 5500 0000 0000 0004)

Advanced ElasticSearch Query

"clauses": [ { "span_multi": { "match" : { "regexp": { "blob.content": "5[1-5][0-9]{2}" } } } }, { "span_multi": { "match" : { "regexp": { "blob.content": "[0-9]{4}" } } } }, { "span_multi": { "match" : { "regexp": { "blob.content": "[0-9]{4}" } } } }, { "span_multi": { "match" : { "regexp": { "blob.content": "[0-9]{4}" } } } } ], "slop": 0, "in_order": true } }

To find Visa numbers without spaces (for example, 4111111111111111),

Single Term Regexp

4[0-9]{15}

To find the Visa numbers that might have spaces or dashes (for example, 4111-1111-1111-1111)

Advanced ElasticSearch Query

{"regexp":{"attachment.content":"4[0-9]{3}[ ]?[0-9]{4}[ ]?[0-9]{4}[ ]?[0-9]{4}|4[0-9]{3}[-]?[0-9]{4}[-]?[0-9]{4}[-]?[0-9]{4}"}}

To find American Express numbers without spaces (for example, 340000000000009)

Single Term Regexp

To find the American Express numbers that might have spaces or dashes (for example, 3400 0000 0000 009)

Advanced ElasticSearch Query

{"regexp":{"attachment.content":"3[47][0-9][ ]?[0-9]{6}[ ]?[0-9]{6}|3[47][0-9][-]?[0-9]{6}[-]?[0-9]{6}"}}{

To find the United States Social Security Network (SSN)

Advanced ElasticSearch Query

{"regexp": {"attachment.content": "~(000|666)[0-8][0-9]{2}[- ]?~(00)[0-9]{2}[- ]?~(0000)[0-9]{4}"}}{

To find content with particular text\phrase (for example, Good Admin)

Query String

'Good Admin'

Feedback

Was this page helpful?
Previous

Adding regular expressions

Next

Configure Tiering policy

Feedback

Was this page helpful?