add a little function to do arbitrary string pattern matching in a