title: How to reproduce MATCHES in NSPredicate to query Realm?
body: <p>I have a query using <code>NSPredicate</code> that takes regular expression and matches to paths:</p>
  
  <pre><code>let predicate = NSPredicate(format: "path MATCHES '/test/([^/]*[^/])$'")
  </code></pre>
  
  <p>which matches everything inside folder <strong>test</strong> but excludes all subfolders of folders in <strong>test</strong>, like this:</p>
  
  <ol>
  <li>/test/abc -> <em>yes</em></li>
  <li>/test/abc/def -> <em>no</em></li>
  </ol>
  
  <p>The problem is, that I can't use the <code>MATCH</code> keyword of <code>NSPredicate</code> in <strong>Realm.io</strong>. How can I reproduce this query so it works in Realm?</p>
  
  <p>Adding the exception for completeness:</p>
  
  <p><code>*** Terminating app due to uncaught exception 'Invalid operator type', reason: 'Operator type 6 not supported for string type'</code></p>