Added PregMatch / PregMatchAll Optimizers support optional flags and offset parameters using internal function call.