Replace text patterns with a given replacement using pattern-replace.