remove text between delimiters, multiple times on each line
I need to remove text between the delimiters "<" and ">", but there are multiple instances of these on each line of my text file. For example, I want to turn this: person 1, person 2<email2@mail.com>, person 3<email3@mail.com>, person 4<email4@mail.com>` Into this: person 1, person 2, person 3, person 4 I've tried to use a few things, including sed: sed -e 's/<.*>//' filename.csv but this removes everything between the first < and the last > giving the result person 1, person 2 . you can use a negated character class in your regex: sed 's/<[^>]*>//g' filename.csv If you want to join the dark