Implemented custom pattern support