I would like to use a regex to do the following in Python:
I am given a list of strings such as: 'abc01 - [def02] - ghi03 - jkl04'
Each string will have a different number of items. Some will have brackets around and some will not.
Can someone help me with a regex match that will consist solely of items not in brackets? Dashes and spaces would need to be removed. So for the example above the output would be: [abc01, ghi03, jkl04]
Thanks