title: Linux regex - Using an OR operator at beginning of line
body: <p>I have a csv file which I need to pull the first column out of. I would like to take the header (comprised of letters) and the data which is comprised only of numbers. </p>
  
  <p>Sample input:</p>
  
  <pre><code>"HEADER1","HEADER2"
  "1234567","TEXT"
  "3456789","TEXT2"
  </code></pre>
  
  <p>As both are encapsulated within double quotes my output should be:</p>
  
  <pre><code>"HEADER"
  "1234567"
  "3456789"
  </code></pre>
  
  <p>I am currently using the following regex, which is only giving me the data and not the header. I thought the 'OR' operator in the middle would include any text as well as numbers encapsulated by double quotes. Any idea why this isn't giving me my header?</p>
  
  <pre><code>grep -o "^\"[0-9]\+\"\|^\"[A-Z]\+\"\"" test.csv &gt; test2.csv
  </code></pre>
  
  <p>Cheers</p>