hi all! i'm trying to use gnu sed's M extension for multiline regex
pattern matching, but i can't get it to work. i'm using gnu sed 4.2.1
on ubuntu lucid. as a data point, other gnu extensions like I (case
insensitive) work happily.

details below. i've read the man and info pages and searched the web
and list archives, but no luck. does anyone have any ideas?

purgatory:~> sed --version
GNU sed version 4.2.1
...
purgatory:~> cat test
a
bc
d
purgatory:~> sed 's/BC/x/I' test
a
x
d
purgatory:~> sed 's/a$bc/x/M' test
a
bc
d
purgatory:~> sed 's/a^bc/x/M' test
a
bc
d
purgatory:~> sed 's/a$^bc/x/M' test
a
bc
d
purgatory:~> sed 's/a\nbc/x/M' test
a
bc
d
purgatory:~> sed "s/a\nbc/x/M" test
a
bc
d
purgatory:~>

Reply via email to