tests: add tests of function string_replace_regex