Hi,
This will probably do what you want:
sed 's%http://\(123\).http://www.abc.com/a.html%http://www...ent/\1/a.html%'
Sed is not bound to the / seperator, it can be any charachter as long as they are the same. Because your string contains /, I decide to use % as sed seperator.
The
\(123
\) in the searchstring and the
\1 in the replacestring are 'special' and called backreference. The \1 is replaced with the content between \( and \) in the searchstring (123 in this case).
Hope this helps.