We have identities in this format AAA-BBB-CC-xxxxxx
We would like to capture the first three portions (AAA-BBB-CC) into a variable
Is there a way to pull via regex? I think “.*-” should return what we need. But I can’t find out how to set it to a variable
I’ve gotten this far:
:local ident [/system identity get name];
Which returns the full identity
And this will then return AAA:
:local loc [:pick $ident 0 [:find $ident -]];
but that doesn’t seem to work like cut so using 1 doesn’t choose the next field
Any help would be appreciated.
Thanks