Optional URL parts in urlManager don't work in 2.0 like they did in 1.1

In Yii 1.1 I have this urlManage rule working:

'books/<hash:\w{8}>(/[^/]+)?' => 'books/view',

So I could have URLs like this:

/books/AH2438C5/The title of the book

And have the action ignore the title.

In Yii 2.0 this doesn’t work.

How would I write the same rule for Yii 2.0 and why has this changed?

The documentation says nothing about this: