title: Share extension only with specific URL
body: <p>Is there a way to filter Share extension to show only when, for example, the URL domain is a specific one? </p>
  
  <p>For example, I want to show my app extension only when the user is sharing a google link: </p>
  
  <p><code>http://www.google.com/?someQuery</code></p>
  
  <p>If I'm filtering to get URLs, a code like below would be sufficient:</p>
  
  <pre><code>SUBQUERY (
      extensionItems,
      $extensionItem,
      SUBQUERY (
          $extensionItem.attachments,
          $attachment,
          ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url"
      ).@count == $extensionItem.attachments.@count
  ).@count == 1
  </code></pre>
  
  <p>In this case the predicate access the <code>$attachment</code>'s <code>registeredTypeIdentifiers</code> property and evaluate it. I want to be able to match a REGEX against the value inside the <code>$attachment</code>, something like this:</p>
  
  <pre><code>SUBQUERY (
      extensionItems,
      $extensionItem,
      SUBQUERY (
          $extensionItem.attachments,
          $attachment,
          ANY $attachment.registeredTypeIdentifiers UTI-CONFORMS-TO "public.url" AND
          ANY $attachment.value MATCHES "^http\:\/\/www\.google\.com\/"
      ).@count == $extensionItem.attachments.@count
  ).@count == 1
  </code></pre>
  
  <p>... so my extension would be invisible when my application don't support the URL shared by the host app.</p>
  
  <p><strong>PS:</strong> Note that the URL domain used is only an example. The real one, of course, have a meaning to be used like this.</p>