Implemented regex and callback wrapper