import remystring = "/some/path/with/%variable%/%inside%/%it%/"print(re.findall("%([^%]+)%", mystring))
Standard input is empty
['variable', 'inside', 'it']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!