ClickHouse/src/Functions/replaceRegexpAll.cpp
Robert Schulze 494d6ca3df
Cleanup implementation of regexpReplace(All|One)
This is a pure refactoring, there are no semantic changes.

Cherry-picked from #42682.
2022-11-02 15:49:53 +00:00

27 lines
556 B
C++

#include "FunctionStringReplace.h"
#include "FunctionFactory.h"
#include "ReplaceRegexpImpl.h"
namespace DB
{
namespace
{
struct NameReplaceRegexpAll
{
static constexpr auto name = "replaceRegexpAll";
};
using FunctionReplaceRegexpAll = FunctionStringReplace<ReplaceRegexpImpl<ReplaceRegexpTraits::Replace::All>, NameReplaceRegexpAll>;
}
REGISTER_FUNCTION(ReplaceRegexpAll)
{
factory.registerFunction<FunctionReplaceRegexpAll>();
factory.registerAlias("REGEXP_REPLACE", NameReplaceRegexpAll::name, FunctionFactory::CaseInsensitive);
}
}