use sed for regex matching