Improved regexp for getting URL prefix for source URLs