Forum Discussion
Sep 12, 2013
strip-out string up to 2nd match char
f5 BIG-IP 11.4.0 LTM VE
iRule question
I need to strip-out the portion of a string up to ( but not including ) the 2nd occurrence of a character.
EXAMPLE :
[HTTP:path] = /images/V00/...
Kevin_Stewart
Employee
Sep 12, 2013All of these will work:
set string "/images/V00/icons/myicon.ico"
log local0. "/[lindex [split $string /] 1]"
log local0. "/[findstr $string / 1 /]"
log local0. [string range $string 0 [expr [string first "/" $string 1] -1]]
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