email[string] function

Apr 2, 2011
1,273
3
53
North Carolina, USA
TCC 25.00.28 x64 Windows 7 [Version 6.1.7601]
TCC Build 28 Windows 7 Build 7601 Service Pack 1



When I run the following command ona text file to verify email addresses - this is the output:

[C:\Z_WorkHere\LST_000]set num=1 & for %line in (@Addr.lst) ( ( if %@email[%line] eq 0 echo %num = %line )& set num=%@inc[%num] )
1 = 15211-FEEDBACK-182@LB.BCENTRAL.COM
19 = alt.tv.american-idol+unsubscribe@googlegroups.com
23 = AOLFeedback1
26 = aw-confim@eBay.com
43 = Brooke_Langton-accept-Nz1Lp30Nol_p763xSWX=VVY@yahoogroups.com
44 = Brooke_Langton-reject-0=DquHPjjXoA4moH3Ji704k@yahoogroups.com
59 = Cesedude
72 = Christine_Elise_Fans-reject-582B97C=IX75QoUqlQP1mt8@yahoogroups.com
81 = Comic207
82 = confirm-s2-8Un_1bMGsPnmd83O9d5PEsphdLE-gallowayc=aol.com@yahoogroups.com
83 = confirm-s2-kwenad4vdxflf1wygbaffoljxummirf2-gallowayc=aol.com@yahoogroups.com
140 = CSGalloway@Gmail.com
144 = CSGatMoms
158 = DoctorWho8
165 = Emmausfan
199 = hans.@hotmail.com
228 = info.london@Meridiana.it
237 = InTheZone1103
238 = InTheZone1103
251 = JoeysItalianGirl
264 = kcornettoh
271 = lady00wrestling
TCC: (Sys) The system cannot find the file specified.
""
318 = Mstvjab
343 = PattonGG
344 = PattonGG
376 = SBurn10
393 = Stacia777
410 = TarraAnn85
431 = weekendafirenze.com
441 = YoungatH

I know why the ones without the at symbol are errored. but the ones with reject, accept, =, etc are valid.

I can not figure out what is causing the TCC: (Sys) error line, am attaching addr.lst
 

Attachments

May 20, 2008
10,563
78
Syracuse, NY, USA
Hmmm! According to the help this regular expression is used to validate email addresses.

Code:
"^[\w-]+(\.[\w-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)*?\.[a-z]{2,6}|(\d{1,3}\.){3}\d{1,3})(:\d{4})?$"
Apparently,

1. '+' and '=' are not allowed (I don't know if that's correct)
2. something is required after '.' and before '@' (also dunno about that one)
3. uppercase is not allowed after '@' (pretty sure that's wrong, "Gmail.com" works) (use that regex and @REGEX[] with CSGalloway@Gmail.com (fails) and with CSGalloway@gmail.com succeeds)

The error is probably coming from a stray '>' or '<'.
 
Apr 2, 2011
1,273
3
53
North Carolina, USA
@vefatica - Thank you for your reply!

I am drawing a blank on what I would search for in terms of the standard rules for forming an email address...... Want to see what is vaiid before i go further here....
 
Apr 2, 2011
1,273
3
53
North Carolina, USA
The address MUST contain "@" and localpart@domain where local part:
  • uppercase and lowercase Latin letters A to Z and a to z;
  • digits 0 to 9;
  • printable characters !#$%&'*+-/=?^_`{|}~;
  • dot ., provided that it is not the first or last character and provided also that it does not appear consecutively (e.g., John..Doe@example.com is not allowed
and domain:
  • uppercase and lowercase Latin letters A to Z and a to z;
  • digits 0 to 9, provided that top-level domain names are not all-numeric;
  • hyphen -, provided that it is not the first or last character.
From your post #2:

1 - those chars are allowed
2 - still not sure about this one
3 - uppercase is allowed in the domain

I am learning the regex - but would appreciate knowing how to change the regex into allowing #1 and 3 above please
 
May 20, 2008
10,563
78
Syracuse, NY, USA
2 - still not sure about this one
Your quote said dots were OK in localpart (but not first, last, or consecutive).

And then there's the form

Code:
comment <email_address>

I am learning the regex - but would appreciate knowing how to change the regex into allowing #1 and 3 above please
Before the '@', where you see [\w-] throw in '=' and '+'. '+' may have to be escaped, so use either [\w-+=] or [\w-\+=].

Have a look here:

1586138616114.png
 
Jan 12, 2014
386
7
Switzerland, SO
Hmmm! According to the help this regular expression is used to validate email addresses.

Code:
"^[\w-]+(\.[\w-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)*?\.[a-z]{2,6}|(\d{1,3}\.){3}\d{1,3})(:\d{4})?$"
Apparently,

1. '+' and '=' are not allowed (I don't know if that's correct)
2. something is required after '.' and before '@' (also dunno about that one)
3. uppercase is not allowed after '@' (pretty sure that's wrong, "Gmail.com" works) (use that regex and @REGEX[] with CSGalloway@Gmail.com (fails) and with CSGalloway@gmail.com succeeds)

The error is probably coming from a stray '>' or '<'.
About 1. ... I do not know the '=' ... however I KNOW that the '+' is allowed related to the used email server software - for example also on my virtually hosting server. And it's not forbidden in the RFC 5322 ...
The sense there is that the part after the '+' till @ is cutted out, so you can make "fine-tuned" email addresses without needing to use a real existent address ... but you can filtering it!

Example:

The following address could be a exist/known address on a email server:

iamreal@emailhost.ch

so far so good, now I will fine-tune it with the '+' sign:

iamreal+invoice@emailhost.ch

So, for the server it's still valid because the '+invoice' is cutted out.

On your client you will see the complete address and you can now easy sort it to your invoice folder (or something like that).

PS: Hope you understand me in my bad english :-)
PPS: Even the '=' is valid too.
 
Last edited:
Jan 12, 2014
386
7
Switzerland, SO