so got to this $pp_shortcertname= "${trusted['certname']}".match(/([^.]+)\./)[1]
not sure I fully understand why this works and [] doesn't. Not 100% sure I understand what the [1] does ! A On Thursday, 4 August 2016 16:17:55 UTC+10, Alex Samad wrote: > > Hi > > I want to take ${trusted['certname']} and extract the hostname short form > from it. > > so if i had thisbox.abc.com.au. I would like to get just thisbox > > I have tried this > > $pp_shortcertname= "${trusted['certname']}[/bitbucket/]" > > doesn't work , tried this > > $pp_shortcertname= "${trusted['certname']}"[/bitbucket/] > > error cannot convert to numeric error. > > and > > $pp_shortcertname= ${trusted['certname']}[/bitbucket/] > > doesn't work > > ??? bit lost ... > -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/f00fb4b2-75d2-4144-a31c-b8114c1d3078%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.