tweak SearchPattern()