Implement POSIX-regex Replace All (could be more efficient but