Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

email[string] function

Apr
1,793
15
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 = [email protected]
19 = [email protected]
23 = AOLFeedback1
26 = [email protected]
43 = Brooke_Langton-accept-Nz1Lp30Nol_p763xSWX=[email protected]
44 = Brooke_Langton-reject-0=[email protected]
59 = Cesedude
72 = Christine_Elise_Fans-reject-582B97C=[email protected]
81 = Comic207
82 = confirm-s2-8Un_1bMGsPnmd83O9d5PEsphdLE-gallowayc=[email protected]
83 = confirm-s2-kwenad4vdxflf1wygbaffoljxummirf2-gallowayc=[email protected]
140 = [email protected]
144 = CSGatMoms
158 = DoctorWho8
165 = Emmausfan
199 = [email protected]
228 = [email protected]
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

  • Addr.txt
    13.3 KB · Views: 44,170
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 [email protected] (fails) and with [email protected] succeeds)

The error is probably coming from a stray '>' or '<'.
 
@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....
 
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., [email protected] 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
 
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
 
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 [email protected] (fails) and with [email protected] 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:

[email protected]

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

[email protected]

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:

Similar threads

Back
Top