v.24.10Improvement

Allow Empty Needle in replaceRegexp Functions

Allow empty needle in functions replaceRegexp*. #70053 (zhanglistar).
Allow empty needle strings in replaceRegexp* functions in ClickHouse.

Why it matters

This feature enables users to pass an empty string as the needle parameter in the replaceRegexp* family of functions, which previously did not support empty needles. This enhancement improves flexibility in regular expression replacements and helps handle edge cases where the pattern to replace might be empty.

How to use it

Users can now call replaceRegexp* functions with an empty string as the needle argument, for example: replaceRegexpOne(text, '') or replaceRegexpAll(text, ''), to apply replacements involving empty patterns.