Extrakce shod a okolí z textu

Intermediate Regular Expressions in R

Angelo Zehr

Data Journalist

Zmínky o názvu společnosti

"...got to the store. Super smooth and seamless experience. Great value. I would highly recommend ABC Enterprises and I will be coming back for sure! Next, we went..."

Jedno slovo: (\\w+\\s), 0 až 10 slov: (\\w+\\s){0,10}

str_extract_all(
  blog_post,
  pattern = "(\\w+\\s){0,10}ABC Enterprises\\s?(\\w+\\s){0,10}"
)

Vrátí: "I would highly recommend ABC Enterprises and I will be coming back for"

Intermediate Regular Expressions in R

Interpunkce

"...got to the store. Super smooth and seamless experience. Great value. I would highly recommend ABC Enterprises and I will be coming back for sure! Next, we went..."

Extrahováno: "I would highly recommend ABC Enterprises and I will be coming back for"

Nahraďte \\w+ za [\\w[:punct:]]+

Extrahováno: "smooth and seamless experience. Great value. I would highly recommend ABC Enterprises and I will be coming back for sure! Next, we "

Intermediate Regular Expressions in R

Pojďme si procvičit!

Intermediate Regular Expressions in R

Preparing Video For Download...