Generally, law questions are off-topic, so I'll answer in a way that's broadly applicable. For the most part, building components that are no longer code-compliant are grandfathered in until work needs to be done on them. So if you have a section of galvanized pipe that's rusted or clogged, you'll have to replace that section with copper or something else that's permitted by contemporary code. Whether the inspector will allow you to get away with a spot repair using compliant materials or will consider that the repair means the whole system is no longer compliant and needs to be replaced depends heavily on the personality of the inspector, how well you treat him, and the local construction culture. In other words, the law is not really all that relevant here. Be courteous and maybe put on your politics hat, if necessary.