Look Around
Look around to match pattern in a sentence
lookaround_nearby_n(word_ls1, word_ls2, n, exclude = "", third_AND_string = "")
word_ls1
: is a string, which includes a list of words connected by "|" that indicates 'OR'word_ls2
: is a string, which includes a list of words connected by "|" that indicates 'OR'n
: is a number, indicates the number of words to look aroundexclude
: is a vector, including a list of words to be excluded from matchthird_AND_string
: similar to word_ls1 or word_ls2, it is a string that includes a list of words connected by "|" that indicates 'OR'A regex string
con1 <- c('apple', 'bean', 'food') con2 <- c('big', 'delicious') lookaround_nearby_n(word_ls1 = con1, word_ls2 = con2, n = 2, exclude = "", third_AND_string = "")
Useful links