i have a CIDR range in this regex
^5\.188\.62\.([1-9]?\d|[12]\d\d)$
I am able to confirm matching values using https://regexr.com
Now i am testing some code and i am using the following as a sample to test matches
var='^5\.188\.62\.111';[[ $var =~ '^5\.188\.62\.([1-9]?\d|[12]\d\d)$' ]] && echo yes || echo no
In final, i am not able to get it working.
Any tip to solve?
Thanks