I'm searching text_
which is: 本周(3月25日-3月31日),国内油厂开机率继续下降,全国各地油厂大豆压榨总量1456000吨(出粕1157520吨,出油262080吨),较上周的...[continued]
crush <- str_extract(string = text_, pattern = perl("(?<=量).*(?=吨(出粕)"))
meal <- str_extract(string = text_, pattern = perl("(?<=粕).*(?=吨,出)"))
oil <- str_extract(string = text_, pattern = perl("(?<=出油).*(?=吨))"))
prints
[1] "1456000" ## correct
[1] "1157520" ## correct
[1] NA ## looking for 262080 here
Why do the first two match but not the last one? I'm using the stringr
library.