RegEx - restrict to 1st line

Thanks but when I use that in the replace text action it does not work. What am I missing?