Guys I have the following case:
def AllEnviroments = ['company-test', 'MYTEST-1234', 'company-somethingelse-something']
def EnviromentChoices = (AllEnviroments =~ /company-.*|MYTEST/).findAll().collect().sort()
How to exclude from this regex strings that have ” something ” or whatever it will be in it's place inside it so it will print only company test and DPDHLPA
Expected result : PRINT company-test and mytest-1234 and NOT "company-something"