proper subscring matching