Forum Discussion
Robert_47833
Jun 11, 2012Altostratus
how to check whether one pattern are all digits[0-9]
hi,
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
what I want to is : check whether [getfield [HTTP::uri] "/" 2] is all digits [0-9]
thanks in advance
- hooleylistCirrostratusHi Jucao,
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