I have a hashmap with just two keys. One key, value is having a pattern like this -
"flownamewkf1_somethingwkf2_something.." => 1"
The second key, value has pattern like this -
"some_name" => "group_name"
Now i want to create a new string in this way:
make-deployment-group --flowname/wkf1_something --flowname/wkf2_something group_name
Sometimes flowname can have only one wkf name and then the first key,value will be "flownamewkf1_something" => 1"
and the string should be
make-deployment-group --flowname/wkf1_something group_name
So, I need to dynamically generate the string based on number of wkf, the flowname has and add the group_name
at the end and make-deployment-group at the beginning and the folder and wkf names in the middle
I tried string.partition(/wkf/)
but the splits the string into three parts flowname, wkf, rest of part
Please help.