Forum Discussion
Parse username from server response
- May 26, 2020
Hi Squeak,
You can use string map to strip the double quotes.
set strip_quotes [string map {\" {}} $parse_user]
Kind regards
Ben
Hi Squeak,
http://www.tcl.tk/man/tcl8.5/TclCmd/Tcl.htm#M24
"If a backslash (“\”) appears within a word then backslash substitution occurs." -> "This allows characters such as double quotes, close brackets, and dollar signs to be included in words without triggering special processing."
In this example, we've substituted double quotes with an empty space {}. You can alternatively use double quotes for the second parameter:
set strip_quotes [string map {\" ""} $parse_user]
Kind regards
Ben
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