import re s = 'SomeTextSomeTextASomeThingBSomeTextSomeTextASomeThingElseBSomeText'regex='A.*?B' print re.findall('A(.*?)B', s)
Standard input is empty
['SomeThing', 'SomeThingElse']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!