suppose to have the following string:
commandone{alpha} commandtwo{beta} {gamma}commandthree commandtwo{delta}
and I want to abtain:
commandone{alpha} beta {gamma}commandthree delta
well I'm triying with regex and sed, I can easily find if is it present the pattern I look for /commandtwo{.*}/ but not erasing commandtwo and the following two brakets. A way would be to work only the substrings "commandtwo{beta}" and "commandtwo{delta}" but I don't know even if is it possible or noto using sed.
I'm looking for a regex to perform the action I've described. thank in advance