When using the replace text in a file action, set (?m) before the regular expression value. All text occurrences will be replaced.