Commit can be signed-off by other people then author and committer. Maybe you should create more universal static regexp in replaceSignedOfByLine() that will match all signed-off tags regardless who actually signed commit.