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

Signed-off-by: Rack Lin <racklin@gmail.com>
Merge pull request #126 from racklin/enhancemant/pregmatch2

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