我需要用正則表達式匹配兩個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