Best on desktop
The spreadsheet workspace needs more room than this screen offers. Switch to a laptop for the full experience.
You're a privacy analyst preparing 12 rows of internal customer notes for an outside vendor. Three categories of PII appear inline in the Notes column and must be replaced with literal placeholder tokens before export:
| Pattern | Format | Replace with |
|---|---|---|
| SSN | xxx-xx-xxxx (3 digits, 2 digits, 4 digits) | [SSN] |
| Phone | xxx-xxx-xxxx (3 digits, 3 digits, 4 digits) | [PHONE] |
local@domain.tld | [EMAIL] |
Example: "Customer email lisa@hooli.net SSN 111-22-3333 phone 646-555-8765" → "Customer email [EMAIL] SSN [SSN] phone [PHONE]".
Rows may contain zero, one, or several of these patterns; rows with no PII pass through unchanged.
Recommended approach — chain three REGEXREPLACE calls, each handling one PII category:
=REGEXREPLACE(
REGEXREPLACE(
REGEXREPLACE(A2, "\d{3}-\d{2}-\d{4}", "[SSN]"),
"\d{3}-\d{3}-\d{4}", "[PHONE]"
),
"[A-Za-z0-9._-]+@[A-Za-z0-9.-]+", "[EMAIL]"
)
The patterns are deliberately non-overlapping — SSN has a 2-digit middle group, phone has a 3-digit middle group, and email contains an @ that never appears in the digit patterns — so the chain order is mostly cosmetic for this dataset. In production you would still apply most-specific-first as a defensive habit (a sloppier "any 10+ digits" pattern would eat SSNs if applied before the phone replace).
Your task:
Graded cells: B3 (Phone 555-123-4567 confirmed → Phone [PHONE] confirmed — single-pattern row), B5 (SSN 987-65-4321 and phone 555-999-8888 on file → SSN [SSN] and phone [PHONE] on file), B6 (No PII in this row → unchanged — zero-pattern row), B10 (Reach out to alex@globex.com or 212-555-0199 → Reach out to [EMAIL] or [PHONE]), B13 (Customer email lisa@hooli.net SSN 111-22-3333 phone 646-555-8765 → Customer email [EMAIL] SSN [SSN] phone [PHONE]).