You should check out the ticket. As it's not possible and has been marked
as enhancement by @mark_story
On 22 Aug 2013 12:03, "Renan Gonçalves" <notifications@github.com> wrote:

> In en/core-utility-libraries/hash.rst:
>
> > @@ -37,8 +37,8 @@ elements.  You apply matchers to expression elements.
> >  | ``Foo``                        | Matches keys with the exact same value.    |
> >  +--------------------------------+--------------------------------------------+
> >
> > -All expression elements are supported all methods.  In addition to expression
> > -elements you can use attribute matching with methods like ``extract()``.
> > +All expression elements are supported by all methods.  In addition to expression
> > +elements you can use attribute matching with methods **only** with ``extract()`` currently.
>
> @davidyell <https://github.com/davidyell> Afaik you can use regex for
> attibute matching but you can't use regex on its own.
>
> Eg, using attribute matching with regex:
>
> // Getting either renan or davidHash::extract($users, '{n}.User[first_name=/(renan|david)/]');
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cakephp/docs/pull/704/files#r5921414>
> .
>