I only glanced quickly at the larger expression, but it seems to allow for quite a bit that you would NOT want. I think it's more geared toward mail servers. For example, I think it will evaluate the following as a valid email address (possibly with random tabs and spaces throughout): <[EMAIL PROTECTED]>
Is this what most people want? Probably not. I would prefer to ensure the email address is in a format like this: [EMAIL PROTECTED] And I think the smaller expression will validate emails in this format just fine. Michael Day On Jun 21, 2006, at 11:53 AM, Igor Vaynberg wrote: > heh, my vote is for michael's :) i merged it into 1.2 and 2.0 > branches. > > what do you guys think? the big pattern is quiete a bit bigger and > the way it works right now is every instance of email addr > validator will create its own copy - maybe if we refactor that to > keep the pattern as a singleton it wouldnt be too bad. but as it is > right now that is 1K extra session space per validator isntance > which is pretty creepy > > -Igor > > > On 6/20/06, Frank Bille Jensen <[EMAIL PROTECTED]> wrote: On > Tue, 2006-06-20 at 08:42 -0700, Igor Vaynberg wrote: > > i wonder how big the created state machine is for this beast :) > > > It's quite big. I just tried to profile it and compare it to the > regex, > which Michael Korthuis provided. If I can calculate correctly it is > over > 100 times larger than Michaels regex. > > Attached is the memory tables for the Pattern object in the to > different > tests. > > > Regards > Frank Bille > Avaleo > > > > > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
