Thx Davide,
I don't think the double slash escapes \ character, so wouldn't be a
valid email.
The second part, I don't understand the relationship preg_match
function with these symbols. I used this function correctly without
these some times.
--~--~-~--~~~---~--~--
Floyd wrote:
> I don't understand:
> - Why is used a double escape \\ bar instead of a single bar \
I think bacause with a single slash in a string you mean that you want
to escape the following character. So \\ stands for escape \
character.
> - What is the meaning of "A(?:" at start of regex
>
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\\.\\-]