Awk - substitution with parts of the matched regular expression used.
I remember reading that using sed, you can do this with parentheses:
s/abc(something)def/(something)else/g
I can't find an explanation of how to do something like this with Awk.
Say you have this in an HTML file, where (number) stands for a one or two-digit number:
<sup>(number)</sup>
And you want to change that to this:
<a name="(number)t" href="#(number)b"><sup>(number)</sup></a>
How would this be possible? Would you have to use sed?
|