import resource = 'mystring/1234567890 hello world mystring/2345678901 hello'print(re.findall(r"(?<=\bmystring/)\d{10}(?!\S)",source))
Standard input is empty
['1234567890', '2345678901']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!