Try adding `r` to the front of each regex definition string to define it as
a `raw`.

> String literals may optionally be prefixed with a letter 'r' or 'R'; such
strings are called *raw strings* and use different rules for interpreting
backslash escape sequences. [1]

Otherwise try isolating the problem by removing the second pair altogether:
`"/(.*)", "index"`.

[1]: http://docs.python.org/reference/lexical_analysis.html#string-literals

On Wed, Jun 9, 2010 at 10:39 AM, kevin <[email protected]> wrote:

> is it possible to use regular expression in subapplication app?
>
> i tried this and it does not work. /(\d+) just maps to index.
>
> import web,subapp
> urls = (
>   "/(\d+)", subapp.app,
>   "/(.*)", "index"
> )
> thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected] <webpy%[email protected]>.
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>



-- 
Angelo Gladding
[email protected]
http://angelo.gladding.name/

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/webpy?hl=en.

Reply via email to