Has this been tested? I’ve tried the example, and I get no replacement.
This is my input: 5556669999
And this is my desired output: 555-666-9999
This is my first test:
{exp:ce_str:ing preg_rep='.*(/^(\\\\\\\\\\\\\\\\d{3})(\\\\\\\\\\\\\\\\d{3})(\\\\\\\\\\\\\\\\d{4})$/).*|$1-$2-$3'}{phone_number}{/exp:ce_str:ing}
Which returns: 5556669999
I’ve determined that CE String is working, but regex does not seem to be working. This test:
{exp:ce_str:ing preg_rep='5|FIVE'}{doctors_phone_numbers:phone_1}{/exp:ce_str:ing}
Returns: FIVEFIVEFIVE6669999
EDIT: I tried it as shown in the example above, and it’s still not working:
{exp:ce_str:ing preg_rep='.*(\\\\\\\\\\\\\\\\d{3})[^\\\\\\\\\\\\\\\\d]*(\\\\\\\\\\\\\\\\d{3})[^\\\\\\\\\\\\\\\\d]*(\\\\\\\\\\\\\\\\d{4}).*|($1) $2-$3'}{phone_number}{/exp:ce_str:ing}
Still returns: 5556669999
EDIT AGAIN:
Doh, I just discovered what the issue is! In the example above, there’s an extra “\” escape. I noticed that an extra escape was added to my post as well. It’s the code formatting that’s messing up the example. So there should only be one escape character before each d above - like this ^\d
|