With respect to the partial matches requirement, I guess the regex you're looking for should be like this:
/(^\d{1,4})(?:(\d{1,6})(\d{1,5})?)?/
Test:
> r = /(^\d{1,4})(?:(\d{1,6})(\d{1,5})?)?/
> s = "378282246310005"
> while(s) { console.log(s.match(r)); s = s.substr(0, s.length - 1) }
["378282246310005", "3782", "822463", "10005", index: 0, input: "378282246310005"]
["37828224631000", "3782", "822463", "1000", index: 0, input: "37828224631000"]
["3782822463100", "3782", "822463", "100", index: 0, input: "3782822463100"]
["378282246310", "3782", "822463", "10", index: 0, input: "378282246310"]
["37828224631", "3782", "822463", "1", index: 0, input: "37828224631"]
["3782822463", "3782", "822463", undefined, index: 0, input: "3782822463"]
["378282246", "3782", "82246", undefined, index: 0, input: "378282246"]
["37828224", "3782", "8224", undefined, index: 0, input: "37828224"]
["3782822", "3782", "822", undefined, index: 0, input: "3782822"]
["378282", "3782", "82", undefined, index: 0, input: "378282"]
["37828", "3782", "8", undefined, index: 0, input: "37828"]
["3782", "3782", undefined, undefined, index: 0, input: "3782"]
["378", "378", undefined, undefined, index: 0, input: "378"]
["37", "37", undefined, undefined, index: 0, input: "37"]
["3", "3", undefined, undefined, index: 0, input: "3"]