python - Google App Engine : How to choose regular expression for app.yaml -
for example : have sub-application name blog. so, when user want go front page of blog, go : localhost/blog
, regular expression link :
-url: /blog script:blog.app
but, example, in application, there other links : localhost/blog/x
such : localhost/blog/signup
or localhost/blog/signin
..... , above regular expression not fit. if want use links, must change again:
-url: /blog/.* script:blog.app
but regular expression cannot fit localhost/blog
. of course, can combine regular expression together, think it's handy. can have 1 regular expression , fit both.
thanks :)
oh. have found on google regular expression app.yaml
same others language used such perl or java regular expression library. so, here regular expression need answer above answer :
- url: /blog(/.*)* script: blog.app
explain: (character)* : mean can have characters or not fit above regular expression.
so, /blog
, /blog/
or /blog/signup
or /blog/signin
... fit.
@: sorry if question looks spam :)
Comments
Post a Comment