RegEx search/replace over multiple files

Dear Wakereh,

my attachment somewhat went wrong... what's attached is a text file saved as
'a.txt'
to test the code in 'a.rb'. Sorry about the inconvenience.

Best regards,

Axel