added a new utility method escapePerlRegex() and test cases
added escapePerlRegex() into learn()