title: How to extract mili second from zulu timing using regex
body: <p>I have below time format and i want only the mentioned format except the mili second:</p>
  
  <pre><code>Input Format : 2012-11-08T20:50:56.073Z
  Expected Format : 2012-11-08 20:50:56
  </code></pre>
  
  <p>Please help as i am new to regex. What i m trying to do is removing first T and Z from the time and then extracting timestamp but it is not working.</p>
  
  <p>How can I extract year from date for below mentioned formats ?</p>
  
  <pre><code>example : input : 2012-11-08 20:50:56 or 2012-11-08 
  Output: 2012
  </code></pre>