title: Regex in intent-filter of Android Manifest
body: <p>I am trying to include a regex in order to implement deeplinking to my activity. We have to activities that share a similar schema which is as follows:</p>
  
  <p>Activity A - <a href="http://www.google.com/a/process?abc=xyz" rel="nofollow">http://www.google.com/a/process?abc=xyz</a>
  Activity B - <a href="http://www.google.com/a/" rel="nofollow">http://www.google.com/a/</a>/?pqr=efg.</p>
  
  <p>Now I declared the deeplink in the manifest as follows :</p>
  
  <pre><code>&lt;activity 
               android:name="com.xyz.samples.ActiivtyB" &gt;
               &lt;intent-filter android:label="SimpleB"&gt;
                  &lt;action android:name="android.intent.action.VIEW" /&gt;
                  &lt;category android:name="android.intent.category.DEFAULT" /&gt;
                  &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
                  &lt;data
                      android:host="www.google.com"
                      android:pathPrefix="/a/"
                      android:scheme="http" /&gt;
              &lt;/intent-filter&gt;
          &lt;/activity&gt;
  </code></pre>
  
  <p>The above declaration for Activity B resolves both urls (mentioned above) since they share the same path till '/a/'. 
  However this is not the problem with Activity A, since its manifest is declared as below :</p>
  
  <pre><code>&lt;activity 
                   android:name="com.xyz.samples.ActiivtyA" &gt;
                   &lt;intent-filter android:label="SimpleA"&gt;
                      &lt;action android:name="android.intent.action.VIEW" /&gt;
                      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
                      &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
                      &lt;data
                          android:host="www.google.com"
                          android:pathPrefix="/a/process"
                          android:scheme="http" /&gt;
                  &lt;/intent-filter&gt;
              &lt;/activity&gt;
  </code></pre>
  
  <p>Hence I came thought of using "regex" which identifies urls of type <strong>/a/</strong>, I verified the regex <a href="http://developer.android.com/guide/topics/manifest/data-element.html" rel="nofollow">here</a> and it is working. Even I wrote a simple Java program to verify this and it is working fine. The regex is <strong>/a/)(?!\bsuccess\b).*</strong> </p>
  
  <p>When I tried to create the deeplink with the above regex, app is not able to resolve the URL of type <a href="http://www.google.com/a/" rel="nofollow">http://www.google.com/a/</a>/?pqr=efg. The manifest is updated as follows :</p>
  
  <pre><code>&lt;activity 
                   android:name="com.xyz.samples.ActiivtyB" &gt;
                   &lt;intent-filter android:label="SimpleB"&gt;
                      &lt;action android:name="android.intent.action.VIEW" /&gt;
                      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
                      &lt;category android:name="android.intent.category.BROWSABLE" /&gt;
                      &lt;data
                          android:host="www.google.com"
                          android:pathPattern="(/a/)(?!\\bsuccess\\b).\\*"
                          android:scheme="http" /&gt;
                  &lt;/intent-filter&gt;
              &lt;/activity&gt;
  </code></pre>
  
  <p>Any help or insights on how to declare regex in manifest will be really helpful. 
  I gone thru the Android documentation <a href="http://developer.android.com/guide/topics/manifest/data-element.html" rel="nofollow">here</a> and updated the regex accordingly.</p>