@Hardik-Shah
10.116.10.0 - 10.116.10.31
10.116.10(0[0-2]|1\d|3[0-1])
what I am doing wrong
First, . means “match any character”, so that’s not what you mean. You should use \. to match a literal dot character.
Second, you didn’t have a dot at all between the 10 and your group, so you are effectively looking for 10.116.10 followed by two more digits (with restrictions), but not looking for a dot in between. Your group say that it wants to match:
either 0 followed by 0 or 1 or 2
or 1 followed by any digit
or 3 followed
Thus, you are trying to match
10.116.1000 - 10.116.1002
or 10.116.1010 - 10.116.1019
or 10.116.1030 - 10.116.1032
----
10.116.15.32 - 10.116.15.63
search 10.116.15(3[0-2]|1\d|6[0-3])
Again, you are missing the backslash before all the dots, and you are missing the dot between 15 and the final. And that one will thus match
10.116.1530 - 10.116.1532
10.116.1510 - 10.116.1519
10.116.1560 - 10.116.1569
And you haven’t told the regex anything about the .40-.49 or .50.59 range, so you cannot very well expect those to match (even if you fix the other problems)
Hopefully, this explanation for why your attempts didn’t work, combined with @Coises earlier explanation, will help you understand where you are going wrong.
If you cannot figure it out, the next time you show an example, and what you tried, also try to explain why you think it will work (explaining what every character or group of characters in the regex is doing), and we can then tell you why your explanation is wrong.
But, as you have found, regex is not an easy way to find values within a mathematical range, especially for something complicated like an IP address. Every time you want to change the range, you will have to completely reconfigure your regex, and that’s going to get annoying for you. If you were using a programming language that had a library that can parse/understand IP addresses (any language worth its salt will have such a library), you could much more easily find IPs withing ranges, rather than relying on making a new custom regex for every range you want.