Generates failure and find the occurances of pattern in Text