Buckets:
| import re | |
| PII_PATTERNS = [ | |
| re.compile(r"\b\d{3}-\d{2}-\d{4}\b"), # SSN pattern example | |
| re.compile(r"\b\d{5}(?:-\d{4})?\b"), # US ZIP | |
| re.compile(r"\b\d{3}[-.\s]?\d{3}[-.\s]?\d{4}\b"), # phone | |
| re.compile(r"\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b"), # email | |
| ] | |
| def redact_pii(text: str) -> str: | |
| redacted = text | |
| for pat in PII_PATTERNS: | |
| redacted = pat.sub("[REDACTED]", redacted) | |
| return redacted | |
Xet Storage Details
- Size:
- 445 Bytes
- Xet hash:
- 70aa884509a88d1d686ea3a5d5fae2e9daf7bd4a79928a8d4817e3fee6f9f4de
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.