Note that the current version of stringr based on the ICU regex library, and the use of perl() is deprecated.
Note that lookbehind patterns are fixed-width, and there seems to be a problem with the way the ICU parses the first letter in your lookbehind pattern (it cannot calculate its width for some unknown reason).
Since you use stringr , you can simply rely on a capture that can be achieved with str_match to extract part of the template:
> match <- str_match(s, "出油(\\d+)吨") > match[,2] [1] "262080"
Thus, you will avoid any possible problems in the future. In addition, these regular expressions are faster because there is no unanchored lookbehind in the template that runs at every place in the search string.
Alternatively, you can simply use the PCRE regular expression with an R base:
> regmatches(s, regexpr("(?<=出油)\\d+(?=吨)", s, perl=TRUE)) [1] "262080"
source share