title: Bash Script Regular Expressions...How to find and replace all matches?
body: <p>I am writing a bash script that reads a file line by line. </p>
  
  <p>The file is a .csv file which contains many dates in the format DD/MM/YYYY but I would like to change them to YYYY-MM-DD. </p>
  
  <p>I would to match the data using a regular expression, and replace it such that all of the dates in the file are correctly formatted as YYYY-MM-DD.</p>
  
  <p>I believe this regular expression would match the dates:</p>
  
  <pre><code>([0-9][0-9]?)/([0-9][0-9]?)/([0-9][0-9][0-9][0-9])
  </code></pre>
  
  <p>But I do not know how to find regex matches and replace them with the new format, or if this is even possible in a bash script. Please help!</p>