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
Post a Comment