Why does this need to be a separate block rather than a modification of the regex used in the previous block (~40 lines above)?