Your problem is that your regex looks at each list element seperately - it can not "see" that there are "("
and ")"
elements before/after the current element it looks at.
I propose cleaning your list beforehand:
import re
from itertools import chain
listnew = ['E-Textbooks','Dynamic', 'Case', 'Management', '(', 'DCM', ')']
# collect indexes of elements that are ( or ) or things between them
# does not work for ((())) - you might need to do something more elaborate
# if that can happen
remove = []
for i,k in enumerate(listnew):
if k == "(":
remove.append(i)
elif k != ")" and remove and i == remove[-1]+1 and remove[-1] != ")":
remove.append(i)
elif k == ")":
remove.append(i)
data = [k for i,k in enumerate(listnew) if i not in frozenset(remove)]
# did not touch your regex per se - you might want to simplify it using regex101.com
nounbreak = list(chain(*[re.findall(r"\b\w+\b(?![\(\w+\)])", i) for i in data]))
print(nounbreak)
Output:
['E', 'Textbooks', 'Dynamic', 'Case', 'Management']
If you only have short lists - you could also ' '.join(..)
them and clean the string from things inside parenthesis - see f.e. Regular expression to return text between parenthesis on how to accomplish this and remove it from the string.