title: Using regex function on date in Pyspark
body: <p>I need to validate date(string format) in Pyspark Dataframe and I need to remove additonal characters,notations in date if they are present. How to validate like that ?</p>
  <p>I came across this code</p>
  <pre><code>regex_string='\/](19|[2-9][0-9])\d\d$)|(^29[\/]02[\/](19|[2-9][0-9])(00|04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96)$)'
  df.select(regexp_extract(col(&quot;date&quot;),regex_string,0).alias(&quot;cleaned_map&quot;),col('date')).show()
  </code></pre>
  <p>Below is my output</p>
  <pre><code>+-----------+-----------+
  |cleaned_map|       date|
  +-----------+-----------+
  |           |01/06/w2020|
  |           |02/06/2!020|
  | 02/06/2020| 02/06/2020|
  | 03/06/2020| 03/06/2020|
  | 04/06/2020| 04/06/2020|
  | 05/06/2020| 05/06/2020|
  | 02/06/2020| 02/06/2020|
  +-----------+-----------+
  </code></pre>
  <p>My expected output</p>
  <pre><code>+-----------+-----------+
  |cleaned_map|       date|
  +-----------+-----------+
  | 01/06/2020|01/06/w2020|
  | 02/06/2020|02/06/20!20|
  | 03/06/2020| 03/06/2020|
  | 04/06/2020| 04/06/2020|
  | 05/06/2020| 05/06/2020|
  | 06/06/2020| 06/06/2020|
  | 07/06/2020| 07/06/2020|
  +-----------+-----------+
  </code></pre>