These are standard regular expressions (
http://docs.python.org/library/re.html ) where . means "any one character",
+ means "one or more", and * means "zero or more" - so the first will match
any URL that has one or more characters after the / while the second will
additionally match the URL "appy/" with nothing after the slash.  In that
case, the empty string "" will be passed to foo1.GET()

Michael

Michael Diamond
[email protected]
www.DigitalGemstones.com


On Wed, Aug 22, 2012 at 6:15 AM, Dexter <[email protected]> wrote:

> Can any one plz tell me the difference between the two links
>
> urls = (
>     'appx/(.+)',                           'foo1',
>     'appy/(.*)',                            'foo2'
> )
>
> class foo1:
>     def GET(self,name):
>         #Some code
>         return
>
> As much as I can dig from the documentation ... each ( ) can handle a
> variable
> for eg appx/Bob will populate name with with Bob
>
> how do (.+) and (.*) differ in behaviour
>
> Cheers
> PK
>
>  --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/webpy/-/hD8-pnnJBtoJ.
> 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.
>

-- 
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