Dear friends,
I've read the documentation about sed - sed(8), re_format(7) and
/usr/share/doc/usd/15.sed/ - but I still don't realize how to make this
command work:
$ s/(^[A_Z]{1})([a-z]+)\.sgml/\1\2\.html/g
As I read I must prefix the '{', '}', '(' and ')' with backslashes. Even if
I do so, the command does not work. The command should take a filename
starting with a capital letter followed with the extension 'sgml' and
translate the extension to 'html'.
Accordingly to http://www.bsd.org/regexintro.html it should work, but it
does not.
I think there is some bug with the implementation of sed or the "branch"
(one or more pieces concatenated - as stated under re_format) is not
supported with BRE.
Someone could clarify this to me, please? Also, how do I get the expected
result?
Rgds
Marcello