dimanche 23 avril 2017

C++ find substring with character mutation?

say, I have a string

abcdefkkkkk

and I have a pattern defg ,and want to match defk from the above string ,which means allow a different character.

so I want to get defk from the string(or the location in the string), is there an efficient way to do this, in case my pattern may have more mutations, like def** or *def* (* means any character is ok)?

In general, I have a string , and a pattern ,and I allow a certain number of not match (like defg match defk in the string).

Aucun commentaire:

Enregistrer un commentaire