#!/bin/bashs='(888) 747-7424'sed -E 's/^(([^0-9]*[0-9]){2}[^0-9]*)([0-9])(([^0-9]*[0-9]){4}[^0-9]*)([0-9])/\1\6\4\3/' <<< "$s"
Standard input is empty
(884) 747-7824
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!