What would be the equivalent of this (Javascript) in python?
var patt = /sub(\d+)\.domain\.com\/(\d+)/
, m = url.match(patt)
, url = 'http://sub' + m[1] + '.domain.com/' + m[2]
I'm new at Python and not quite understanding the regex system yet :(