【发布时间】:2012-06-26 13:53:06
【问题描述】:
我需要用正则表达式匹配两个ipaddress: 喜欢 20.20.20.20
should match with 20.20.20.20
should match with [http://20.20.20.20/abcd]
should not match with 20.20.20.200
should not match with [http://20.20.20.200/abcd]
should not match with [http://120.20.20.20/abcd]
目前我正在使用类似这样的正则表达式:".*[^(\d)]20.20.20.20[^(\d)].*"
但它不适用于第一种和第三种情况。请帮我解决这个正则表达式。
【问题讨论】:
标签: sql regex ip-address