I need a regular Java regular expression for the below problem. I have some list of ip address ranges as patterns in a text file. How extract the matched ip addresses from the given bulk string data.
For example the text file contains:
The given String:
Experts are ready to help solve your problem. The quality of your question will directly influence the speed and accuracy of the answers you receive.The given ip address is 184.108.40.206 and also it may be 220.127.116.11.
This is the next line of text and which contains the following ip address 18.104.22.168 and this should not match.
This is the third line and which contains 61.78 4.9 this also should not match. But this should match.22.214.171.124
Here 126.96.36.199 contains 188.8.131.52 but its not valid ip, so it should not match.
Thanks in advance.