Skip to content

Instantly share code, notes, and snippets.

@Opalo
Created April 18, 2019 05:54
Show Gist options
  • Save Opalo/45b6ae9db723ad65c128e7b9b67c78eb to your computer and use it in GitHub Desktop.
Save Opalo/45b6ae9db723ad65c128e7b9b67c78eb to your computer and use it in GitHub Desktop.
def input = "Application!01.01.01 TestSuite1,TestSuite2,TestSuite3,TestSuite4 Product!01.01.01,Product2!01.01.02"
def groups = input.split(' ')
def applications = groups[0].split(',').collect { it.split('!') }.collectEntries { [(it[0]):it[1]] }
def suites = groups[1].split(',')
def products = groups[2].split(',').collect { it.split('!') }.collectEntries { [(it[0]):it[1]] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment