I have one huge HTML files with many links i.e. <a href="...">
. I need to substitute each href
with a unique arbitrary value. So, after substitution the first link will be <a href="http://link1">
, second link <a href="http://link2">
, and so on.
Can we do this using a regex? Or, do I need to write a small script to scan over the file? Ideally, the solution will be a Perl or bash script (not something proprietary).
感谢。