title: In R, expand a table, splitting apart rows distinguished internally
body: <p>[Edit: The responses are great; thank you. Unfortunately, I oversimplified my reprex.  My actual data have dashes inside the parentheses sometimes.  Also, as was noted, sometimes there are more than two variants.  I am editing my reprex accordingly.]</p>
  <p>I am tidying a table of prices for products from a given manufacturer.  The models come in variants, with each variant of the same model being the same price, so the original table creator listed the price only once, and distinguished the models with an internal parenthesized alternative scheme. E.g. &quot;1000-a&quot; and &quot;1000-b&quot; are variants of the same model, indicated on the price list as &quot;1000-a(b)&quot;.  I would like to list each model out on its own row.</p>
  <p>Reprex:</p>
  <pre><code>prices &lt;- data.frame(
    model = c(&quot;1000-a(-b)&quot;, &quot;2000-a(b)&quot;, &quot;150-L(R)&quot;, &quot;TX-a(-b)-J&quot;, &quot;350-LX(-S)(-AB)&quot;),
    price = seq(1999,5999,1000)
  )
  &gt; prices
              model price
  1      1000-a(-b)  1999
  2       2000-a(b)  2999
  3        150-L(R)  3999
  4      TX-a(-b)-J  4999
  5 350-LX(-S)(-AB)  5999
  </code></pre>
  <p>Sometimes the differences are single characters, sometimes multiple. Sometimes they are at the end of the model number, sometimes in the middle.
  I would like code which produces this:</p>
  <pre><code>&gt; desired_prices
      model price
  1  1000-a  1999
  2  1000-b  1999
  3  2000-a  2999
  4  2000-b  2999
  5   150-L  3999
  6   150-R  3999
  7  TX-a-J  4999
  8  TX-b-J  4999
  9  350-LX  5999
  10  350-S  5999
  11 350-AB  5999
  </code></pre>
  <p>This seems related to the question <a href="https://stackoverflow.com/questions/13773770/split-comma-separated-strings-in-a-column-into-separate-rows">Split comma-separated strings in a column into separate rows</a>, but in my case the values aren't comma delimited.</p>
  <p>How may I produce this split/expansion? A tidyverse solution is preferred but not required.</p>