I am trying to create two separate regex expressions, the first is trying to find ipv4 addresses in the 192.168.0.x range in the middle of a large string, which also contains large amounts of white-spaces and other numerals.
[P]The second expression is underneath the same conditions, but the address is in the 10.x.x range :
Sample valid addresses: 192.168.0.0 / 192.168.0.255 and 10.0.0.0 / 10.0.255.255
I have very little experience with regex: my attempt at solving the first problem was (192\.168\.0\.)+([0-9]|[1-8][0-9]|9[0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])
[P]I believe that this is on the wrong track, and want to see how it's properly done, or at least some tips on finding a solution. I am using a java environment to parse the strings