Reputation: 1
For example, var str1 = "abc.test.com:8080"
I need something as follows,
var splitted = split(str1,":")
var only_hostname = splitted[0] //will give abc.test.com*
How can we actually achieve the same in TICKscript?
Upvotes: 0
Views: 436
Reputation: 46
You could define the variable as a regex...Something like var str1 =~ /abc.test.com/ so you will aggregate by host independant of ports...
I never need exactly your use case, but maybe in the go specs you could find what you need!
Upvotes: 0