symfony找不到GET的路线

No route found for "GET /category/wordone-wordtwo"

This is the error I get when I try to access

http://localhost/site/web/app_dev.php/category/wordone-wordtwo

Routing.yml:

csa_platform_category:
path:     /category/{slug}
defaults: { _controller: CSAPlatformBundle:Category:index }
requirements:
    slug: "~^[a-z]+(?:-[a-z]+)*$~"

this requiremens slug for slugs like (wordone-wordtwo-wordtree)

All routes work good. except this route: csa_platform_category

What if you get rid of the Tilde (~) and the double quotes:

csa_platform_category:
   path:     /category/{slug}
   defaults: { _controller: CSAPlatformBundle:Category:index }
   requirements:
      slug: '^[a-z]+(?:-[a-z]+)*$'

Try it - I'm not sure if that makes any difference.