#!/bin/bash s="(555)555-1212 (555)555-1213 (555)555-1214 (666)555-1215 (777)555-1217" sed -E 's/(\(555\))(.*-)(.*)/Area code: \1 Second: \2 Third: \3/' <<< "$s"
Standard input is empty
Area code: (555) Second: 555- Third: 1212 Area code: (555) Second: 555- Third: 1213 Area code: (555) Second: 555- Third: 1214 (666)555-1215 (777)555-1217