Update string_matcher.py

Searching algorithm improved.