I think most airlines tend to allocate specific blocks to flights they code share onto.
One well known UK based carrier started a system (and still seems to use it) that was 0-299 long haul and 300-999 short haul. Originally domestic was 4xxx but now 1xxx. Bear in mind, however, that as noted above not all flights fit into that rule where the flight is actually operated by someone else on a code share or franchise basis.