title: RethinkDB: matching a substring in a list of strings
body: <p>Thanks to the answer <a href="https://stackoverflow.com/questions/21801054/rethinkdb-typeerror-var-object-is-not-callable-when-using-lambda-function">here</a>, I manged to get all the rows that contain a given string as a substring of a specific field's value by:</p>
  
  <pre><code>r.db('my_db').table('my_table').filter(lambda row: row['some_key'].match(".\*some_given_string.\*"))
  </code></pre>
  
  <p>What if I want to have a similar result, but this time, "some_key" is a <em>list</em> of strings instead of a single string? Say for the following table:</p>
  
  <p><code>[{"name": "row1", "some_key": ["str1", "str2"]}, {"name": "row2", "some_key": ["str3", "blah"]}, {"name": "row3", "some_key": ["blah", "blahblah"]}]</code></p>
  
  <p>I want to look for <code>".*tr.*"</code> and get the first two rows only because the last one has a list under "some_key" that doesn't contain "tr" in none of its strings.</p>
  
  <p>How can I do that with rethinkdb?</p>