Forum Discussion
Robert_47833
Altostratus
Jun 11, 2012how 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
1 Reply
- hoolio
Cirrostratus
Hi Jucao,
I replied to your other post here:
https://devcentral.f5.com/Community/GroupDetails/tabid/1082223/asg/50/aft/2158816/showtab/groupforums/Default.aspx2264003
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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