title: Using pivot_longer with multiple paired columns in the wide dataset
body: <p>I have a dataset that looks like this:</p>
  
  <pre><code>input &lt;- 
    data.frame(
      event = 1:2,
      url_1 = c("g1", "g3"),
      name_1 = c("dc", "nyc"),
      url_2 = c("g2", "g4"),
      name_2 = c("sf", "la"))
  </code></pre>
  
  <p>Essentially there are pairs of indexed columns that are stuck together in wide form. I want to convert to long to give this output:</p>
  
  <pre><code>output &lt;- 
    data.frame(
      event = c(1,1,2,2),
      url = c("g1", "g2", "g3", "g4"),
      name = c("dc", "sf", "nyc", "la"))
  </code></pre>
  
  <p>I want to do this using <code>pivot_longer</code>. I've tried this:</p>
  
  <pre><code>input %&gt;% 
    pivot_longer(contains("_"))
  </code></pre>
  
  <p>How can I get the function to recognize the column-pairs?</p>