title: Zend Route Regex: Match controller segment of Url to anything but "home"
body: <p>I am working with Urls in the following format: "controller/action" where the slash is required.</p>
  
  <p>I need to create a PCRE regex to match the controller and action names unless the controller name has the value of "home." For example:</p>
  
  <ul>
  <li>"member/update" should produce "member", "update"</li>
  <li>"admin/index" should produce "admin", "index"</li>
  <li>"home/index" should produce <code>&lt;nomatch&gt;</code></li>
  </ul>
  
  <p>I've been playing around with look ahead, behind, and around and I have parts of it working but no totally correct solution. Any help appreciated.</p>
  
  <p>** EDIT<br/>
  Here's a little more background. I want to set up Zend routing so that </p>
  
  <ul>
  <li>an url with just one part '/foo' dispatches to HomeController, i.e. '/home/foo'</li>
  <li>any url with two parts '/controller/action' dispatches to that controller: e.g., '/member/update' dispatches to MemberController, '/member/update'; &nbsp; '/home/index' dispatches to HomeController, etc.</li>
  </ul>
  
  <p>Right now I have routes set up as:</p>
  
  <pre><code>$router-&gt;addRoute('homeRoute', 
      new Zend_Controller_Router_Route(
          ':action',
          array('controller' =&gt; 'home', 'action' =&gt; 'index')
      )
  );
  $router-&gt;addRoute('memberRoute', 
      new Zend_Controller_Router_Route(
          'member/:action',
          array('controller' =&gt; 'member', 'action' =&gt; 'index')
      )
  );
  // and so on, a route for each non-Home controller: adminRoute, etc
  </code></pre>
  
  <p>This is working the way I want but it's ugly and a maintenance problem. I'm want to replace all of the routes 'memberRoute', 'adminRoute', etc, with a single Regex route:</p>
  
  <pre><code>$router-&gt;addRoute('siteRoute',
      new Zend_Controller_Router_Route_Regex(
          '????/:action',
          array('action' =&gt; 'index'),
          array(?? =&gt; 'controller')
      )
  );
  </code></pre>
  
  <p>I have been running my regex experiments with a little php script like:</p>
  
  <pre><code>&lt;?php
      preg_match('/????/', 'home/index', $output);
      echo '0=&gt;'.$output[0].';';
      echo '1=&gt;'.$output[1].';';
  ?&gt;
  </code></pre>