Skip to main content
1 of 5
Stéphane Chazelas
  • 585.1k
  • 96
  • 1.1k
  • 1.7k

With sed which doesn't support non-greedy *, you'd need to use tricks like:

sed 's/_/_u/g;s/|/_p/g;s/<!!!>/|/g
     s/===[^|]*|/whatever/g
     s/|/<!!!>/g;s/_p/|/g;s/_u/_/g'
Stéphane Chazelas
  • 585.1k
  • 96
  • 1.1k
  • 1.7k