http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49978
--- Comment #4 from hal at oz dot net 2011-08-04 17:35:34 UTC --- Here's what it looks like: $ echo foo | sed "s/\(^\|.* \)@documenten/bar/" foo $ pgm='s/^ *@documentencoding *\([^ ][^ ]*\) *$/\1/ > t found > d > :found > q' $ echo foo | sed -e "$pgm" $ echo $pgm s/^ *@documentencoding *\([^ ][^ ]*\) *$/\1/ t found d :found q