Just a guess: Set uses XPath expressions, which require doubling the
braces: {{4}}

On Sat, May 24, 2008 at 4:50 PM, ianh <[EMAIL PROTECTED]> wrote:
>
> I came across the new Set::matches method. Its just genius so kudos to
> whoever came up with that. Obviously there aren't many examples around
> - mostly in the Containable test so Im a bit stuck on just how good it
> can be.
>
> One of the examples shows that Set::matches('/Comment[text=/cakephp/
> i', $data) will match $data['Comment']['text'] = cakephp; but what
> other regexps can be done?
>
> For example, playing around, I couldnt do Set::matches('/Comment[text=/
> [a-z]{4}/i', $data) because the method kept spitting out Unexpected
> PHP error [preg_match() [<a href='http://php.net/function.preg-
> match'>function.preg-match</a>]: No ending delimiter '/' found]
> severity errors.
>
> Am I missing something on how to do this or can it simply not be done
> at the moment?
>
> Cheers. ianh
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to