RE match and near-match library