Finds and transforms only the first three occurrences of a pattern, ignoring any subsequent ones.