Forum Discussion
Robert_47833
Altostratus
Nov 22, 2011how 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...
hoolio
Cirrostratus
Jun 08, 2012I think you'd need to list the exact number of digits that you want to match when using string match. If you use scan, you can match on any number of digits using %[0-9]:
if {[scan [getfield [HTTP::uri] "/" 4] {%[0-9]} match]==1}{
Parsed all digits
} else {
Did not parse all digits
}
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
