title: Filtering list items with case insensitive
body: <p>Need help to minimize the code.I have used RegEx to filter data from a JSON file to accept (I)teration as well (i)teration. But while replacing the list items which has Iteration or iteration, I can only replace one. by appending the results I am getting the desired output, but it stretches the code for this simple task.and I am not sure though tomorrow I may get Iteration as iTERaTion ..</p>
  
  <p>My goal is to extract the only numbers from the list items to convert it to date time format, which I will be taking care.</p>
  
  <p>Code:</p>
  
  <pre><code>print("Unfiltered Folders : \n", Path_List)
  regex = re.compile('(?i)^20\d{6}-Iteration$')
  regex1 = re.compile('(?i)-iteration$')
  Filtered_Path_List = list(filter(regex.search,Path_List))
  print("List of Iteration folder will be considered for further Process: \n", 
  Filtered_Path_List)
  
  final_iteration = [e.replace("-Iteration", "") for e in Filtered_Path_List]     
  print("Latest Iteration list : ", final_iteration)
  </code></pre>
  
  <p>LOG:</p>
  
  <pre><code>    Unfiltered Folders : 
   ['20171226-Iteration', '20180105-iteration', '20180112-iteration', '20180117-Iteration', '20180118-Iteration', '20180123-Iteration', '20180124-Iteration', '20180202-Iteration', '20180207-Iteration', '20180220-Iteration', '20180321-Iteration', '20180322-Iteration', '20180327-Iteration', '_Kyle-AutomationTesting', '_Template']
  List of Iteration folder will be considered for further Process: 
   ['20171226-Iteration', '20180105-iteration', '20180112-iteration', '20180117-Iteration', '20180118-Iteration', '20180123-Iteration', '20180124-Iteration', '20180202-Iteration', '20180207-Iteration', '20180220-Iteration', '20180321-Iteration', '20180322-Iteration', '20180327-Iteration']
  Latest Iteration list :  ['20171226', '20180105-iteration', '20180112-iteration', '20180117', '20180118', '20180123', '20180124', '20180202', '20180207', '20180220', '20180321', '20180322', '20180327']
  all_iteration.txt file created on : 2018-04-12 16:44
  
  Process finished with exit code 0
  </code></pre>
  
  <p>As you can see the final_iteration[] has '20180105-iteration', '20180112-iteration' without filter effect.</p>