I believe someone told you in your previous thread on this that you need to use "\d" and "\D" in your expressions, not just "d" or "D" (which match literal characters.) As such, your expression isn't matching anything and, consequently, isn't catching anything in $1, $2, and $3. So, when you print $formattedphone all it contains is the literal "+" you have assigned to it.
-sauoq "My two cents aren't worth a dime.";
In reply to Re: regular expressions and match variables
by sauoq
in thread regular expressions and match variables
by sierrastar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |