On 2004-11-03 11:25:14 +0000 Brett Parker iDunno@sommitrealweird.co.uk wrote:
it will cheerfully play with any of the headers that happen to have [ALUG] in them. Not nice.
Correct.
sed 's/^(Subject: .*)[ALUG] (.*)$/\1\2/;' which will *only* play with the Subject header.
Why not sed '/^Subject: /s/[ALUG]//' # instead? The leading regex means that the s command will only act on matching lines.