I am trying to get a regex for a phone number with exactly 12 digits in the format: +############.
The code I am trying to use is ([+]?)\d{12}(\d{2})?$, but no luck.
([+]?)\d{12}(\d{2})?$
Try this:
^\+\d{12}(\d{2})?$
You needed to escape the plus sign
Regex101 Demo