I think your regular expression is wrong. Something like this. Square brackets [] means "one of the items inside the bracket", dot . means any character, and round bracket () groups things together.
str_extract_all(input$x, '[有玩買賣看].{0,4}股票')
I think your regular expression is wrong. Something like this. Square brackets [] means "one of the items inside the bracket", dot . means any character, and round bracket () groups things together.
str_extract_all(input$x, '[有玩買賣看].{0,4}股票')