Oracle regexp_replace 默认替换字符串
Oracle regexp_replace default replace string
我有一个简单的问题,我找不到答案:
这是:
regexp_replace(somecolumn, someregex)
和下面一样吗?
regexp_replace(somecolumn, someregex, NULL)
是的,它们是一样的。 REPLACE 的文档对此行为有更明确的说明:
If replacement_string is omitted or null, then all occurrences of search_string are removed.
但 REGEXP_REPLACE 的行为方式相同。第三个参数 replace_string
替换匹配模式的任何内容;如果它被省略或为 null,则删除字符串的所有匹配部分。
我有一个简单的问题,我找不到答案:
这是:
regexp_replace(somecolumn, someregex)
和下面一样吗?
regexp_replace(somecolumn, someregex, NULL)
是的,它们是一样的。 REPLACE 的文档对此行为有更明确的说明:
If replacement_string is omitted or null, then all occurrences of search_string are removed.
但 REGEXP_REPLACE 的行为方式相同。第三个参数 replace_string
替换匹配模式的任何内容;如果它被省略或为 null,则删除字符串的所有匹配部分。