Lines Matching refs:regs
696 OnigRegion *regs = NULL; in _php_mb_regex_ereg_exec() local
734 regs = onig_region_new(); in _php_mb_regex_ereg_exec()
737 …r *)(string + string_len), (OnigUChar *)string, (OnigUChar *)(string + string_len), regs, 0) < 0) { in _php_mb_regex_ereg_exec()
745 match_len = regs->end[0] - regs->beg[0]; in _php_mb_regex_ereg_exec()
748 for (i = 0; i < regs->num_regs; i++) { in _php_mb_regex_ereg_exec()
749 beg = regs->beg[i]; in _php_mb_regex_ereg_exec()
750 end = regs->end[i]; in _php_mb_regex_ereg_exec()
764 if (regs != NULL) { in _php_mb_regex_ereg_exec()
765 onig_region_free(regs, 1); in _php_mb_regex_ereg_exec()
803 OnigRegion *regs = NULL; in _php_mb_regex_ereg_replace_exec() local
874 regs = onig_region_new(); in _php_mb_regex_ereg_replace_exec()
876 …ig_search(re, (OnigUChar *)string, (OnigUChar *)string_lim, pos, (OnigUChar *)string_lim, regs, 0); in _php_mb_regex_ereg_replace_exec()
885 if (regs->beg[0] == regs->end[0]) { in _php_mb_regex_ereg_replace_exec()
891 smart_str_appendl(&out_buf, pos, (size_t)((OnigUChar *)(string + regs->beg[0]) - pos)); in _php_mb_regex_ereg_replace_exec()
902 if (n >= 0 && n < regs->num_regs) { in _php_mb_regex_ereg_replace_exec()
903 if (regs->beg[n] >= 0 && regs->beg[n] < regs->end[n] && regs->end[n] <= string_len) { in _php_mb_regex_ereg_replace_exec()
904 smart_str_appendl(pbuf, string + regs->beg[n], regs->end[n] - regs->beg[n]); in _php_mb_regex_ereg_replace_exec()
932 n = regs->end[0]; in _php_mb_regex_ereg_replace_exec()
947 onig_region_free(regs, 0); in _php_mb_regex_ereg_replace_exec()
953 if (regs != NULL) { in _php_mb_regex_ereg_replace_exec()
954 onig_region_free(regs, 1); in _php_mb_regex_ereg_replace_exec()
991 OnigRegion *regs = NULL; in PHP_FUNCTION() local
1016 regs = onig_region_new(); in PHP_FUNCTION()
1019 …ing, (OnigUChar *)(string + string_len), pos, (OnigUChar *)(string + string_len), regs, 0)) >= 0) { in PHP_FUNCTION()
1020 if (regs->beg[0] == regs->end[0]) { in PHP_FUNCTION()
1026 if (regs->beg[0] < string_len && regs->beg[0] >= (pos - (OnigUChar *)string)) { in PHP_FUNCTION()
1027 …add_next_index_stringl(return_value, (char *)pos, ((OnigUChar *)(string + regs->beg[0]) - pos), 1); in PHP_FUNCTION()
1033 n = regs->end[0]; in PHP_FUNCTION()
1040 onig_region_free(regs, 0); in PHP_FUNCTION()
1043 onig_region_free(regs, 1); in PHP_FUNCTION()