import repattern = re.compile(r'\w[\w/\\-]*(?:\s*[\w/\\-])*')print(pattern.findall("HELLO-WORLD"))
Standard input is empty
['HELLO-WORLD']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!