The regexes are subtly different:
/^((https?:)?\/\/)(([a-z0-9]+)\.wikia-dev\.com\/(.*))$/
/^(https?):\/\/(i[0-9]+\.([a-z0-9]+))\.wikia-dev.com\/(.*)$/

The first groups the domain + path so it can be easily used to prepend a subdomain while ensuring it doesn't already have a subdomain (in addition to the dev username) prepended to it. The goal of the second is to take the path to the server resource out of the complete url. While they can be combined into a single regex, I feel like that regex would be overly complicated.