Use sed -e instead of -E
Simplify regex, not replacing trailing colon (:)
use regex triplet, add unit test