I have a string as follows:
course_name = \"Post Graduate Certificate Programme in Retail Management (PGCPRM) (Online)\"
I want to extract only
Pretty simple:
In [8]: course_name
Out[8]: 'Post Graduate Certificate Programme in Retail Management (PGCPRM) (Online)'
In [9]: print re.sub('\([A-Z]+\)\s*', '', course_name)
Post Graduate Certificate Programme in Retail Management (Online)
In [17]: print re.search('\(([A-Z]+)\)\s*', course_name).groups()[0]
PGCPRM