php - How do I stop this from being greedy -


i have following regex:

#^/workorder/(.*)/# 

provided following uri's:

/workorder/archive/2/ 

the $matches variable preg_match() returning archive/2/

why doesn't last / in regex stop (.*) being greedy? add make regex stop when / delimiter found?

this it.

^/workorder/([^/]*)/ 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -