I need to get parts of a string in a particular format. Tried everything from split, substring to pattern and matcher. but everytime it fails with one of the requirements.
Suppose
str = (((abc) shdj (def) iueexs (ghi)) mkek ONE(tree23) bjm
(twooo(bug OR bag)) mvnj THR-EE(<*>$##))
And terms wanted are :
"Hard Coded Term1":abc
"Hard Coded Term2":def
"Hard Coded Term3":ghi
ONE:tree23
twooo:bug,bag
THR-EE:<*>$##
Provision to hard code the terms as in the case of first three. Help!Help!