<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="/h/themes/default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Routes: Underscore between vars in URL</title> 
  <pubDate>Sun, 19 May 2013 23:24:27 +0000</pubDate> 
  <link>http://bugs.horde.org/ticket/7727</link> 
  <atom:link rel="self" type="application/rss+xml" title="Routes: Underscore between vars in URL" href="http://bugs.horde.org/ticket/7727/rss" /> 
  <description>Routes: Underscore between vars in URL</description> 
 
   
   
  <item> 
   <title>when creating a route with an &quot;_&quot; between to variables like </title> 
   <description>when creating a route with an &quot;_&quot; between to variables like this:



/some/example/:myVar_:anotherVar



I get the following error



 MESSAGE: preg_match() [function.preg-match]: Compilation failed: syntax error in subpattern name (missing terminator) at offset 42

TYPE: Warning

FILE: /usr/local/php5/lib/php/Horde/Routes/Route.php

LINE: 612

DEBUG INFO:



607 if (substr($url, -1) == '/' &amp;&amp; strlen($url) &gt; 1) {

608 $url = substr($url, 0, -1);

609 }

610

611 // Match the regexps we generated

612 $match = preg_match('@' . str_replace('@', '\@', $this-&gt;regexp) . '@', $url, $matches);



613 if ($match == 0) {

614 return false;

615 }

616

617 $host = isset($kargs['environ']['HTTP_HOST']) ? $kargs['environ']['HTTP_HOST'] : null;</description> 
   <pubDate>Thu, 27 Nov 2008 10:52:44 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/7727#t50962</link> 
  </item> 
   
  <item> 
   <title>I've verified that essentially the same regex error happens </title> 
   <description>I've verified that essentially the same regex error happens in the python version given the same input. I think the route might simply be ambiguous; if you use this as the route path, it works:



$m-&gt;connect('/some/example/:(myVar)_:(anotherVar)', array('controller' =&gt; 'default'));</description> 
   <pubDate>Sat, 29 Nov 2008 01:17:02 +0000</pubDate> 
   <link>http://bugs.horde.org/ticket/7727#t50997</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
