Update string_matcher.py

Search algorithm improved