Forum Discussion
soymanue
Nimbostratus
Oct 12, 2012Hostname split
Hello
I need to split a hostname into three parts ( ..).
This can be done al least on two ways:
1) scan [HTTP::host] %\[^.\].%\[^.\].%s prefix host suffix
2) set prefix [ge...
Kevin_Stewart
Employee
Oct 12, 2012I'd probably turn it into a list:
set myhost [split [HTTP::host] "."]
Then you could use the full force of list commands for processing.
- llength to determine the size of the hostname
- the last index is the root: [expr [llength $mylist] - 1]
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