Hi,

I'm defining new regex validators in cake/validator.php file. I have
worked with regex in other projects but indeed I don't understand some
issues of the regex that was defined in cake by default.

Example:

define('VALID_EMAIL', '/\\A(?:^([a-z0-9][a-z0-9_\\-\\.\\+]*)@([a-z0-9]
[a-z0-9\\.\\-]{0,63}\\.(com|org|net|biz|info|name|net|pro|aero|coop|
museum|[a-z]{2,4}))$)\\z/i');

I don't understand:
- Why is used a double escape \\ bar instead of a single bar \
- What is the meaning of "A(?:" at start of regex
- Why there is a "/" at start
-What is the meaning of "\\z/i" at final of regex

I searched for regex manuals in google but i not found response for my
doubts. Neither in this googlegroup.

Excuse me for my bad english and if my doubts are basic.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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