yamakasi.014@gmail.com
2014-Sep-08 09:31 UTC
[Puppet Users] Split domain and tld from domainname
HI, I'm facing an issue where I need to grab the tld and domain from a domainname no matter how many subdomains there are. SO far I have tried regsubstr() and split() where split is getting where I want, but not fully yet: $split = split("sub.sub.sub.domain.tld", '[.]') The following gives me in any case the tld $tld = $split[-1] But as split works from left to right I cannot use $split[1] Is there any way to solve this ? Thanks! Matt -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/b94dbe3f-0d3f-4417-bf1b-89e1fd65c70d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.