Hi funky monk,
$_ = '((transcription AND factor) NOT (control OR regulat) AND (TATA OR TBP) NOT (BLOOD AND marrow))';
my @caps = m/NOT # "NOT"
\s* # spaces?
( # start capturing
\( # "("
+ # some not ")"s
\) # ")"
) # end capture
/xg;
print join "\n", @caps;
</c>
Actually i want NOT terms in one array i.e(control OR regulat)(blood AND marrow) and other terms i.e(transcription
AND factor)(TATA OR TBP) in other array.