import res = '#txt1#txt2#txt3#txt4'print(re.findall(r"#([^#]*)", s))
Standard input is empty
['txt1', 'txt2', 'txt3', 'txt4']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!