Consolidate And Optional String In Yii Url Patterns

Is there a way to consolidate the following Yii URL patterns? How to say, that for example a part is optional.


 '<category:.+>-rezepte/mit-<ingredient:\w+>/<effort:\d+>/<difficulty:\w+>'    =>  'recipes/index',

  '<category:.+>-rezepte/mit-<ingredient:\w+>/<effort:\d+>'                     =>  'recipes/index',

  '<category:.+>-rezepte/mit-<ingredient:\w+>'                                  =>  'recipes/index',

  '<category:.+>-rezepte'                                                       =>  'recipes/index',




  'rezepte-mit-<ingredient:.+>/<category:\w+>/<effort:\d+>/<difficulty:\w+>'    =>  'recipes/index',

  'rezepte-mit-<ingredient:.+>/<category:\w+>/<effort:\d+>'                     =>  'recipes/index',

  'rezepte-mit-<ingredient:.+>/<category:\w+>'                                  =>  'recipes/index',

  'rezepte-mit-<ingredient:.+>'                                                 =>  'recipes/index',

No ideas? :(




  '<category:.+>-rezepte/<ingredient:.*|>/<effort:.*|>/<difficulty:\w+|>'			=> 'recipes/index',

Now the parts are optional. But how to handle the slashes?


test-rezepte/test//leicht

alter alter alter