I need to replace a large set of broken HTML links in a file. For that, I'd need to do a find/replace disabling any kind of regular expression- i.e. the kind of basic Find/Replace you would do from your notepad. I came across to a Ruby script which should do exactly that:
ruby -p -i -e "gsub('<a href=\"index.php?option=com_content&view=article&id=130&catid=111&Itemid=324\">Home</a>', 'NEWLINK')" test.txt
However, the file test.txt is not changed, nor an output is returned. (I don't know much about ruby so I might be just missing something obvious) Is there any other tool which does what I need?
Edit: I'd expect that the following test.txt file:
<a href=\"index.php?option=com_content&view=article&id=130&catid=111&Itemid=324\">Home</a>
....is changed to:
NEWLINK
Thanks