Added get_substring to the libpcre interface

Signed-off-by: Haru <haru@dotalux.com>
Added regular expression matching script commands and operators

- The script command pcre_match and the operator ~= will return the
  number of regular expression matches in a given string (roughly
  equivalent to the php function preg_match or the perl operator =~)
- The operator ~! is the opposite of ~= (roughly equivalent to the perl
  operator !~)
- See script_commands and npc/custom/test.txt for more information.

Signed-off-by: Haru <haru@dotalux.com>