import reline = """aaa$bb$ccc$ddd$eeefff$ggg$hh$iii$jj"""m = re.findall(r'\$[^$]+\$', line)print(m)
Standard input is empty
['$bb$', '$ddd$', '$ggg$', '$iii$']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!