[phobos] Validating email address and std.regex

Andrei Alexandrescu andrei at erdani.com
Sat Feb 26 06:20:41 PST 2011


When writing regex I ported much of regexp's core code without 
understanding much of it. Since then I tried to fix a couple of bugs 
(common to regex and regexp) but couldn't within a reasonable time 
frame. I understand the design but the mechanics of the bytecode in the 
engine are too convoluted for my little brain.

So I can't help much with the bugs in regex(p), but I encourage Walter 
or someone else to fix them. I also think that fixes should only go to 
regex, not regexp. We need to deprecate regexp anyway, and bug fixes 
should be a good opportunity to do that.


Andrei

On 2/26/11 6:16 AM, Jacob Carlborg wrote:
> I've ported the email address validator that has been previously discussed here (http://www.dominicsayers.com/isemail/)
>
> I've encountered a problem with the regular expressions used in the PHP code. Apparently std.regex can't handle them because std.regex doesn't completely follow the ECAM standard.
>
> An issue has already been reported for this: http://d.puremagic.com/issues/show_bug.cgi?id=5169
>
> The following is one of the regular expressions used in the email address validator that std.regex can't handle:
>
> \.(?=(?:[^\"]*\"[^\"]*\")*(?![^\"]*\"))
>
> If we want to have this email address validator I think that issue needs to be resolved.
>


More information about the phobos mailing list