title: Ansible List Variable and Select Filter to ignore matched items
body: <p>I have a variable <code>dir_lst_raw</code> in an ansible playbook whose value is a <em>list</em> as shown below:</p>
  
  <pre><code>"dir_lst_raw": [
          "/path1/dir1/user",
          "/path2/dir2/admin",
          "/path3/dir3/user.ansible_backup_2020-03-16",
          "/path1/dir1/config.ansible_backup_2020-03-16",
          "/path2/dir2/dir3/somefile"
        ]
  </code></pre>
  
  <p>I need to remove all the lines containing <code>.ansible_backup_</code> and save to another variable as a <em>list</em>.
  I've googled for regex and tried to <em>not match the pattern with the select filter</em> as below:</p>
  
  <pre><code>  - set_fact:
        dir_lst: "{{ dir_lst_flt_r | select('match','(^.ansible_backup_)+') | list }}"
  </code></pre>
  
  <p>but the new variable <code>dir_lst</code> turned out as an empty list. I am expecting <code>dir_lst</code> as below:</p>
  
  <pre><code>"dir_lst_raw": [
          "/path1/dir1/user",
          "/path2/dir2/admin",
          "/path2/dir2/dir3/somefile"
       ]
  </code></pre>
  
  <p>Could somebody please suggest how can I get it done?</p>