Can anybody tell me the re expression for splitting the string:
('(A) gre (B)Toefl (C)PET (D)CET')
to a list:
['gre','Toefl','PET','CET']
using Python?
You could capture anything -- except an opening parenthesis -- after a closing parenthesis, trimmed:
s = '(A) an example (B) next point (C)CAPS, lowercase! (D)CET'
result = re.findall(r"\)\s*([^(]*)(?<! )", s)
result
will be:
['an example', 'next point', 'CAPS, lowercase!', 'CET']