add match preview tab 2

1. char *pattern = StringValueCStr(str_pattern); ok
2. You mean premature initialization of res_hash? I wanted to return hash (empty or not) in any case.