我需要用正则表达式匹配两个ip地址: 像20.20.20.20两个IP地址匹配
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)].*"
但它无法正常工作为第一和第三个case.Please帮助我这个正则表达式。
感谢您的解决方案:) – user1479571