title: BBEdit Grep/Regex find and replace part after dash
body: <p>What should the regular expression look like when I want to find and remove the part that begins with a dash (-) and everything after in the Article number column?</p>
  
  <p>I'm using BBEdit to search and replace the strings in a tab delimited CSV-file (sample below).</p>
  
  <pre><code>"Article number"    "Name"  "Third Column"
  "Shorts Artic"  "Swa..."    "2018-07-28"
  "Shorts Artic-1"    "Swa..."    ""
  "Shorts Artic-2-1"  "Swa..."    "https://test-domain.com/..."
  "Shorts Artic-2-2-1"    "Sw..." ""
  "Shorts Artic-2-2-2-2-1"    "Ba..." "-asd"
  "Shorts Artic-2-2-2-2-2-1"  "Nus..."
  "Shorts Artic-2-2-2-2-2-1-1"    "Lek.."
  "0858-1"    "Jacket Blue.."
  "0858-2-1"  "Jacket Re.."
  "0858-2-2-1"    "Int..."
  "0858-2-2-2-1"  "In..."
  "0858-2-2-2-2-1"    "Int..."
  "0858-2-2-2-2-2-1"  "Int..."
  "0858-2-2-2-2-2-2-1"    "Int..."
  "0858-2-2-2-2-2-2-2-1"  "In..."
  "0858-2-2-2-2-2-2-2-2"  "In..."
  "0858-2-2-2-2-2-2-2-1"  "In..." "6 107-124 cm"
  "stl 31-35-1-1-1-1-2-2-2-1-1"   "In..."
  </code></pre>
  
  <p><code>"Shorts Artic-1"</code> would turn into <code>"Shorts Artic"</code></p>
  
  <p><code>"Shorts Artic-2-2-1"</code> would turn into <code>"Shorts Artic"</code></p>
  
  <p><code>"0858-2-2-2-2-2-2-2-2"</code> would turn into <code>"0858"</code></p>