Forum Discussion
Mauricio_Cusine
Aug 22, 2007Nimbostratus
Validate IP address with regexp
Hello,
I am trying to check if a IP address is valid in the bigip with regexp (I don't know if anybody know other method).
The regexp is the follow but don't work. Anybody can help me?....
qqdixf5_74186
Feb 19, 2008Nimbostratus
Hi Aaron,
I was trying out your test rule for ip address matching. With a vliad ip address as follow, no match was found. Please advice. Thank you!
when RULE_INIT {
set ::match {}
set ::ip_address "10.10.10.10"
set ::ip_address_regex {\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b}
regexp $::ip_address_regex $::ip_address ::match
log local0. "\$::ip_address: $::ip_address; matched: $::match"
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects