Question:
I am trying to modify the phone number from a text file and display it the following ways using the Sed and Extended Regular Expression. I am new to Regular Expression so not sure what to do.The first two numbers will be in parentheses and there are underscores after the second and sixth number. For example :(04)_1234_5678
The first number will become +61, followed by a space. For every three other digits, add a dash. For example +61 412-435-678
phone.txt
sed 'S/04/()/_1234_5678'
Answer:
Usingsed
If you have better answer, please add a comment about this, thank you!