Apply global flag in substitution

Add loop to move through a path name looking for additional matches if
the global flag is provided for a substitution.  The loop breaks when no
more matches are found for the rule.  Previously, the global flag would
end up advancing to the next rule instead of searching farther into the
path for another match.
2 files changed