import reurl = 'http://some_url.com/api/v1/1/2/3/4'url = re.sub(r"/\d+(?=/|$)", "/*", url)print(url)
Standard input is empty
http://some_url.com/api/v1/*/*/*/*
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!