import re print(re.findall(r'-\s*([^\W_]+)', '12 - mystr'))print(re.findall(r'-\s*([^\W_]+)', 'qwertyuio'))
Standard input is empty
['mystr'] []
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!