postgres正则表达式匹配

匹配某一个字段的纯数字部分,如下 温度只匹配数字部分

select (regexp_split_to_array('35.778以下','[^\d{2}.\d{1,}]')::varchar[])[1]

 匹配域名host 

select substring('http://page.china.alibaba.com/others/feedbackfromlitalk.html',E'\\w+://([\\w.]+)')

如下图

 

 

 

 

posted @ 2020-06-08 14:55  Young_Mo  阅读(1688)  评论(0编辑  收藏  举报