项目需要使用较高级的替换,自定义了两个函数,
CREATE FUNCTION replace_all( str text, from_str text, to_str text ) :
替换字符串, 大小写不敏感
CREATE FUNCTION replace_all_matchs(str text, from_str text, to_str text ) :
替换字符串, 全字匹配,大小写不敏感
由于使用中并发不高,目前没有经过性能测试,
欢迎大家提出更好的算法.
MySQL自定义字符串替换函数,大小写不敏感和全字匹配替换
猜你喜欢
转载自yizhiju.iteye.com/blog/2314201
今日推荐
周排行