Rendering with replacement shader tags

Can someone clarify how exactly the shader tags are used when rendering using replacement shaders?

from the help (Unity - Manual: Replacing shaders at runtime):

-If replacementTag is empty, then all objects in the scene are rendered with the given replacement shader.
-If replacementTag is not empty, then for each object that would be rendered:
    -The real objects shader is queried for the tag value.
    -If it does not have that tag, object is not rendered.
    -A subshader is found in the replacement shader that has a given tag with the found value. If no such subshader is found, object is not rendered.
    -Now that subshader is used to render the object.

I find this section a bit confusing. The first part is clear I think - objects in the scene whose original shaders do not contain the Tag (ie the key of the tag, independantly of the value of this tag) that is specified as parameter will not be rendered. But the second part regarding ‘found value’ and ‘that subshader is used to render’ I don’t really get. Can someone clarify this?

Looking at the code in question the description is correct (if perhaps a bit vague).

For each object:

First of all, if the replacement tag is empty then the object will be rendered with subshader 0 from the replacement shader.

Otherwise, the original shader is queried for the value of the tag specified. If the shader does not have that tag nothing is rendered. If the original shader has such a tag (and the tag is associated with a value) then the replacement shader is queries for a subshader that matches the tag/value pair. If there is such a match then the object is rendered with that replacement subshader, otherwise nothing is rendered.

As an example in the more complicated case with replacement tags: Say you want to render the scene again with a replacement material, and you request to replace the tag “RenderType”. Each object will have it’s current subshader queried for the value of “RenderTag” (“Opaque”, “TransparentCutout” etc.) and then the replacement shader will be queried for a subshader that matches this value.

Hope this clear things up.