How do you replace every occurrence of a legacy tag delimiter?
replace substitutes every literal occurrence of the search text using binary comparison.
SQLite example and interpretation
Convert a::b::c to a/b/c. If tags can themselves contain double colons, a literal substitution also changes their content.
SELECT replace('a::b::c','::','/');Result [["a/b/c"]]
中文
清洗数据时怎样把所有旧标签分隔符统一替换?
replace 按字面文本匹配并替换所有出现位置,匹配按二进制比较规则进行。
SQLite 示例与适用条件
把 a::b::c 变为 a/b/c。原字段若允许标签内部含双冒号,简单替换会同时改掉标签内容。
SELECT replace('a::b::c','::','/');结果 [["a/b/c"]]