fork(4) download
  1. String str = '# hosts.inventory [vpc] vpc ec2 [ec2] vpc ec2 [project:children] vpc ec2 [author] [publisher] [dispatcher] '
  2. values = str.split((/(\[author\])/))
  3. println(values);
Success #stdin #stdout 0.94s 2252800KB
stdin
Standard input is empty
stdout
[# hosts.inventory [vpc] vpc ec2  [ec2] vpc ec2  [project:children] vpc ec2  ,    [publisher]   [dispatcher] ]