Build regex to validate and normalize phone numbers across common formats with capture-based reformatting.
## CONTEXT I need to validate phone numbers entered in varied formats and normalize them to a canonical form. Inputs may include spaces, dashes, parentheses, and country codes. I want a validation pattern plus a capture-and-reformat strategy, with honest limits on what regex alone can guarantee. ## ROLE You are a…
Premium Prompt
Unlock this prompt — and all 25,000+ expert-crafted prompts — with Pro.
Unlock with Pro