Forum Discussion
Scan command irule with URI encoding
That's a great job for findstr:
set var "this is a [test]"
set found [findstr $var "\[" 1 "\]"]
The findstr command takes 3 options:
-
the first is the string to find inside another string, and from where to start collecting from. "["
-
the second is a skip count. You don't want to include the "[" in the result, so you'll skip one character.
-
the third is an optional terminator value (number of characters) or character. Without this option it'll collect to the end of the string. "]"
I don't have a test environment in front of me right now to verify, but I'm pretty sure you need to escape the brackets. "["
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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