Loops and Logic
Use Loops and Logic's regex feature using capture groups to grab the parts, then insert . or - when reassembling the capture groups
Javascript
Using JS to extract (slice) the phone number into separete parts, inject the . or - and reassemble