The only reason is to make it easier to embed them into the pipeline built with Kernal.|>/2
.
As one might easily see, String.replace/4
delegates to Regex.replace/4
.
When one starts with a string, they might pipe String.replace/4
without a necessity to leave a pipeline. When one starts with a regex, the same applies to Regex.replace/4
.