来源: http://www.codeproject.com/KB/database/xp_pcre.aspx
An Extended Stored Procedure to use regular expressions in T-SQL.
一个使用正则表达式的存储过程.
存储过程下载地址:
Download source and DLL – 219 Kb
Sql Server 不如Oracle,自带正则表达式,不过还是有办法实现的。使用这个SP就可以啦。
使用方法:
1.复制 xp_pcre.dll 到 Program FilesMicrosoft SQL ServerMSSQLbinn 目录下;
2.运行安装脚本 INSTALL.SQL;
3.然后就可以使用啦,主要有以下6个SP:
xp_pcre_match
xp_pcre_match_count
xp_pcre_replace
xp_pcre_format
xp_pcre_split
xp_pcre_show_cache
————————————————————–