Forum Discussion
Rupa_34586
Nimbostratus
Mar 09, 2010retrive rupa from "rupa"
Hi,
i want to function to retrive string from quatations
I have string "rupa". I want to retrive just rupe from that.
I tried using split function but it did not work can you give me some code so that i have to retrive rupa from "rupa"
Regards,
Rupa
3 Replies
- hoolio
Cirrostratus
Hi Rupa,
There are a few ways to do this using TCL or iRules-specific commands:
set test_string {"test"}
"test"
scan $test_string {"%[^"]"}
test
[getfield {"test"} "\"" 2]
test
Or is the input string more than one double quoted token?
Aaron - Rupa_34586
Nimbostratus
Thanks Aaron. It worked.
"/ is the limiter then . thanks for the help - hoolio
Cirrostratus
" is the delimiter for getfield, but you have to escape the double quote with a backslash.
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
