title: Search & Replace Request URI Filter in Google Analytics
body: <p>I have 2 landing pages:</p>
  
  <pre><code>/aa/index.php/aa/index/[sessionID]/alpha
  /bb/index.php/bb/index/[sessionID]/bravo
  </code></pre>
  
  <p>Because the sessionID is unique, each of the landing page will be tracked as different pages. Therefore, I need a filter to remove the sessionID. These are what i want to track:</p>
  
  <pre><code>/aa/index.php/aa/index/alpha
  /bb/index.php/bb/index/bravo
  </code></pre>
  
  <p>I created the Search and Replace Custom Filter on the Request URI:</p>
  
  <pre><code>Search String: /(aa|bb)/index\.php/(aa|bb)/index/(.*)
  Replace String: /$1/index.php/$2/index/$3
  </code></pre>
  
  <p>But i get the <code>/$1/index.php/$2/index/$3</code> being reported on the dashboard the next day. So i tried <code>/\1/index.php/\2/index/\3</code> but i got very strange results, <code>//aa/index.php/aa/index/alpha/index.php/aa/index/aa</code>.</p>
  
  <p>Does anyone know how to reference the grouped patterns in the replace string?</p>
  
  <p><strong>My Solution:</strong>
  i managed to solve it using Advanced Filter. My solution: </p>
  
  <pre><code>Field A =&gt; Request URI: /(aa|bb)/index\.php/(aa|bb)/index/(.*)/(.*) 
  Field B =&gt; - 
  Output to =&gt; Request URI: /$A1/index.php/$A2/index/$A4
  </code></pre>