Move string matching code from CVS repo.