new to Yii.
I want to write a urlManager regex rule that matches to following for the ‘id’ parameter in a url:
d12361287 p324782 d3777
But doesn’t match those
uasi8 sdhajk9 asdjhjask
So the rules are
first character hast to be ‘d’ or ‘p’
then following are only numeric values of variable length
I tried this regex, which works on all the test websites: ^[dp][0-9]*$
integrated it this way but doesn’t work as expected
'rules' => array( '<controller:(car|used-cars|new-cars)>/<id:(^[dp][0-9]*$)>/<title>' => 'car/view', ...
Can anyone help me and point out what i’m doing wrong?