stew has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I am trying to determine if a clients IP address is within a certain range. The first two node are fixed so that's not a problem - the last two can be anywhere between 0 and 55 each ie xxx.xxx.0.55 - good xxx.xxx.56.56 - bad
I initially tried
It's been a long hard day, if anyone has a quick answer to end my frustration that would be most welcome
I am trying to determine if a clients IP address is within a certain range. The first two node are fixed so that's not a problem - the last two can be anywhere between 0 and 55 each ie xxx.xxx.0.55 - good xxx.xxx.56.56 - bad
I initially tried
but it didn't take me long to figure out that xxx.xxx.48.55 would fail DOH!/^111\.255\.(([0-5])|([0-5]{2}))\.(([0-5])|([0-5]{2}))$/
It's been a long hard day, if anyone has a quick answer to end my frustration that would be most welcome
Back to
Seekers of Perl Wisdom