in reply to end of line anchor in regex

There's nothing wrong with your substitution. You're string doesn't end with the word "hello", so it doesn't match and no substitution is made.