title: Need to use stringr to parse text based on location of string
body: <p>I have the following data set. I used <code>devtools::reproduce()</code> to put a sample of my data in here and I only selected the column I need help with, which is <code>genres</code>.</p>
  
  <p>There are a lot of genres listed below. I am working with a movie database and I want to simply use only the first genre listed in there (in this format: <code>Genre1 | Genre2 | Genre3</code>). </p>
  
  <p>How do I use <code>stringr</code> or another package to parse this string data in the way I want?</p>
  
  <p>The end result is to use it in a regression model. </p>
  
  <pre><code>&gt; dput(droplevels(head(movie.cpi,4)))
  structure(list(num_critic_for_reviews = c(723L, 302L, 813L, 462L
  ), director_facebook_likes = c(0L, 563L, 22000L, 475L), actor_3_facebook_likes = c(855L, 
  1000L, 23000L, 530L), actor_1_facebook_likes = c(1000L, 40000L, 
  27000L, 640L), gross = c(866161204.765035, 364628240.876025, 
  476821933.103659, 77736216.375), genres = structure(c(2L, 1L, 
  4L, 3L), .Label = c("Action|Adventure|Fantasy", "Action|Adventure|Fantasy|Sci-Fi", 
  "Action|Adventure|Sci-Fi", "Action|Thriller"), class = "factor"), 
      num_voted_users = c(886204L, 471220L, 1144337L, 212204L), 
      cast_total_facebook_likes = c(4834L, 48350L, 106759L, 1873L
      ), facenumber_in_poster = c(0L, 0L, 0L, 1L), num_user_for_reviews = c(3054L, 
      1238L, 2701L, 738L), content_rating = structure(c(1L, 1L, 
      1L, 1L), .Label = "PG-13", class = "factor"), budget = c(269925874.125874, 
      353545586.107091, 266006097.560976, 280583231.707317), title_year = c(2009L, 
      2007L, 2012L, 2012L), actor_2_facebook_likes = c(936L, 5000L, 
      23000L, 632L), imdb_score = c(7.9, 7.1, 8.5, 6.6), movie_facebook_likes = c(33000L, 
      0L, 164000L, 24000L)), .Names = c("num_critic_for_reviews", 
  "director_facebook_likes", "actor_3_facebook_likes", "actor_1_facebook_likes", 
  "gross", "genres", "num_voted_users", "cast_total_facebook_likes", 
  "facenumber_in_poster", "num_user_for_reviews", "content_rating", 
  "budget", "title_year", "actor_2_facebook_likes", "imdb_score", 
  "movie_facebook_likes"), row.names = c(NA, 4L), class = "data.frame")
  </code></pre>