import re print re.findall(r'^([abc])+$', 'abc')
Standard input is empty
['c']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!