rules: starts with alphanumeric 3 chars long require ONLY one period require alpha after the period
/^[a-zA-Z0-9][\w-].[a-zA-z]/ #but now working sub validate { local $_ = shift; return( length >= 3 and tr/.// == 1 and /^[[:alpha:]]/ and /[a-zA-Z0-9].[a-zA-Z]/ ); #added here still not working } expecting results: a.com - true 1.com - true a_.com - true a-.com - true abc - false a.b.c - false a.1 - false a.- - false a._ - false _a.c - false -a.c - false I think this covers it all? thanks > On Fri, Oct 10, 2003 at 03:56:43PM -0700, [EMAIL PROTECTED] wrote: >> Ok - I got it to work by changing the line to length >= 3 > > Good. > >> If I could push the rule a little further, a new rule added >> is that an alpha char a-Z MUST be after the period. > > Well now you have four rules. Again, I think I'd do this > in four steps (of which you already have solutions for three). > > What have you tried for the new requirement? > > -- > Steve > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > ----------------------------------------- eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]