How to specify a
sed regexp address which is case-insensitive?
But I want
sed to remove lines with
my-kw in any cases.
This will perform the match case-insensitive.
The switch is in uppercase itself, to avoid confusion with the
Just use the
This might work for you:
sed '/[mM][yY]-[kK][wW]/d' file or:
sed 'h;y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/;/MY-KW/d;x' file