adding unit test for search and replace function.
adding code to escape cpp characters.