title: Column name regex - Pandas
body: <p>I have a dataframe in which there are columns with names:</p>
  <pre><code>DATE
  YEARS
  DAY
  MONTH
  YEAR
  </code></pre>
  <p>and a host of other columns</p>
  <p>I am trying to extract columns from  a dataframe which match this criterion</p>
  <pre><code>df_date = df.loc[:, df.columns.str.contains(r'^DATE$|^YEARS$|^DAY$|^MONTH$|^YEAR&amp;')]
  </code></pre>
  <p>In this case, column <code>YEAR</code> is not filtered.</p>