title: regexp value elements in array on Python 2.7
body: <p>in Python2.7.
  I have an array with objects like:</p>
  
  <pre><code>[{"TEMPLATE_NAME": "HP_LaserJet_P2055dn_USB_S29HDY6_HPLIP", 
  "PRINTER_INFO": "HP LaserJet P2055dn", 
  "PRINTER_LOCATION": "Локальный принтер", 
  "DEVICE_URI": "hp:/usb/HP_LaserJet_P2055dn?serial=S29HDY6"}, 
  {"TEMPLATE_NAME": "HP_LaserJet_P2055dn", 
  "PRINTER_INFO": "HP LaserJet P2055dn", 
  "PRINTER_LOCATION": "Локальный принтер", 
  "DEVICE_URI": "usb://HP/LaserJet%20P2055dn?serial=S29HDY6"}]
  </code></pre>
  
  <p>It is necessary for any coincidence of the argument and the string to get the first object found in the array. Now it is done like this:</p>
  
  <pre><code>ArgInListFindNewPrinters = next(name for name in ListFindNewPrinters if ArgPrinter in [name['PRINTER_INFO'], name['DEVICE_URI'], name['TEMPLATE_NAME'], name['PRINTER_LOCATION']])
  print ArgInListFindNewPrinters
  
  &gt;&gt; {"TEMPLATE_NAME": "HP_LaserJet_P2055dn_49A71E", "PRINTER_INFO": "HP HP LaserJet P2055dn", "PRINTER_LOCATION": "Локальный принтер", "DEVICE_URI": "dnssd://HP%20LaserJet%20P2055dn%20%5B49A71E%5D._pdl-datastream._tcp.local/"}
  </code></pre>
  
  <p>The disadvantage of this method is that it looks for a complete match of the argument and the string, but I need any case-insensitive entry.
  Example: <code>ArgPrinter = "LaserJe", ArgPrinter = "=S29HD"</code></p>
  
  <p>The main problem is finding any occurrences of a substring in a string.</p>
  
  <p>===========================================================================
  I found a solution, but it is not very practical because translation into a string requires a change in encoding: </p>
  
  <pre><code>ArgInListFindNewPrinters = next(name for name in ListFindNewPrinters if re.search(ArgPrinter, str(name), re.IGNORECASE))
  </code></pre>
  
  <p>If there are more optimal ways to do this, I will be grateful.</p>