Forum Discussion
Robert_47833
Nov 22, 2011Altostratus
how to match 6 digtals via command except matches_regex
hi,dear irule
if {$uri matches_regex {-[0-9][0-9][0-9][0-9][0-9][0-9]}} {
pool xxx
}
I don't wanna use matches_regex any more
do u have an alternation method to achieve this...
Robert_47833
Jun 10, 2012Altostratus
hi,Aaron
I tried your method
see,some case it doesn't work ,if it is :222xyz,it can exclude xyz222,but it conside 222xyz as all digits
really need your help this time
if { [scan [getfield [HTTP::uri] "/" 2] { %[0-9] } match ] == 1 } {
log local0. " [getfield [HTTP::uri] "/" 2] is ok" }
else {
log local0. " [getfield [HTTP::uri] "/" 2] is not ok"
}
Jun 10 11:37:34 slot3/tmm3 info tmm3[8092]: Rule srwd30-www : xyz222 is not ok
Jun 10 11:37:34 slot3/tmm3 info tmm3[8092]: Rule srwd30-www : xyz222 is not ok
Jun 10 11:37:42 slot3/tmm2 info tmm2[8091]: Rule srwd30-www : 222xyz is ok
Jun 10 11:37:42 slot3/tmm2 info tmm2[8091]: Rule srwd30-www : 222xyz is ok
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