79533205

Date: 2025-03-25 09:33:32
Score: 0.5
Natty:
Report link

sed operates line by line by default and does not handle the multi-line patterns unless it is explicitly instructed. Your regex is not matching the multiple lines in sed. sed treats each line separately.

Try using sed with N for multi-line matching.

sed -i '/\[tr\]/ {N; /\[tr\]\n\[\/tr\]/d; }' file

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Deepak Saini