Forum Discussion
paul_73820
Nimbostratus
Nov 07, 2012regex for a number between 1-99
Hi There,
I am trying to validate a string with that is like this:
pw-10:1000.100
The regex i am using is:
^pw-[1-9]\d?
This works in perl, and infact in tcl 8.5 but doesnt m...
hoolio
Cirrostratus
Nov 07, 2012Hi Paul,
If you can use a string or scan command it should be more efficient than regexp:
switch -glog $str {
pw-[1-9]* -
}
Note that I didn't check for the optional digit following 1-9 as you had it listed as optional in your regex.
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
