title: How to find the pattern in text and substract it in r
body: <blockquote>
  <p>text&lt;-c('Epson Korea, a company well-renowned for color printers and
  projectors, showcased a smart glasses powered by Android OS at a local
  <strong>movie theater CGV in Cheongdam-dong, Seoul</strong>, in the morning of
  Wednesday. The smart glasses’ display can be put on a head and its
  wearer can watch a movie while lying down. ')</p>
  <p>pattern&lt;-c('movie CGV Cheongdam Seoul')</p>
  </blockquote>
  <p>I wanna substract the sentence from text using only that pattern, like this.</p>
  <blockquote>
  <p>movie theater CGV in Cheongdam-dong, Seoul</p>
  </blockquote>
  <p>So I tried to use 'grep' and 'substr' but it's not easy.</p>
  <blockquote>
  <p>pattern2&lt;-c('movie|.* |CGV|.* |Cheongdam|.* |Seoul')</p>
  <p>t&lt;-strsplit(text,' ')</p>
  <p>m&lt;-grep(pattern2, text)</p>
  <p>substr(t,m,attr(m,&quot;match.length&quot;))</p>
  </blockquote>
  <p>How to do this?</p>