"triple_r" <nomail@nomail> wrote in message
news:web.4921949ae31b5110866b6f750@news.povray.org...
> I think the problem is that you need to use \( \) and a \1 to correctly
> extract
> that portion of the text. I have success with:
>
> sed -e 's%<indexentry "\([^"]*\)">%<!-- <indexentry "\1"> -->%g'
Yes ... this works! I'd given up flogging at this and decided to go back to
basics. I have a book that covers sed and awk so I did some reading and
decided that I was at least getting a match of sorts with my first stab at
it because of the results. The grouping with () and the refernce to \1 and
\2 (pattern/hold buffer) was something covered in the book. Your live
working example pulled it all togeather for me .... Thanks!
Jim
Post a reply to this message
|