It all depends on how you want to match the two strings:
Character matching:
"how are you?" and "how do you do?" - about 50% similarity. While strings are the same, count "similar". If strings differ, use some method to find a similar point again.

Word-wise:
Roughly the same as character matching, but instead of matcing characters, parse the string and split into words, and compare words.

The difference between character and word matching omes when matching something like:
"How do you do?"
with
"Howling on you?" [Sorry, silly example, but had to come up with something starting with "How..."]

Linguistically:
"how are you?" and "how do you do?" - not much in common at all (one is asking a genuine question, the other is a formality in greething someone - and no one is genuinely interested in either case ]. This is of course much more complicated than the method of word or character matching, because it has to do with the meaning of the words.


--
Mats