String str = '# hosts.inventory [vpc] vpc ec2 [ec2] vpc ec2 [project:children] vpc ec2 [author] [publisher] [dispatcher] '
values = str.split((/(\[author\])/))
println(values);
Standard input is empty
[# hosts.inventory [vpc] vpc ec2 [ec2] vpc ec2 [project:children] vpc ec2 , [publisher] [dispatcher] ]