Forum Discussion
kpiti_52215
Nimbostratus
Jan 29, 2013lsearch nocase bug or what?
I wanted to use case insensitive list search but I got an error back. Try this proof-of-concept iRule:
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
set list [split [TCP::paylo...
hoolio
Cirrostratus
Jan 29, 2013Hi Jure,
iRules are based on 8.4 Tcl. The -nocase flag was added to lsearch in 8.5:
http://www.tcl.tk/man/tcl8.4/TclCmd/lsearch.htm
http://www.tcl.tk/man/tcl8.5/TclCmd/lsearch.htm
Can you set the list you're searching and the search term in lowercase?
set list [split [string tolower [TCP::payload]] foo]
if { [lsearch -all -nocase $list bar] >= 0 } {
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
