ITS. / NTS. - If Test Condition

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Testing Commands > ITS. / NTS. - If Test Condition >

ITS. / NTS. - If Test Condition

ITS./NTS.Is EMail XP

Previous Top Next


MiniRobotLanguage (MRL)

 

ITS.Is EMail XP

NTS.Is EMail XP

Test if a String can be a valid e-Mail

 

 

Intention

 

Conditional Statement.

Validate the structure of a provided string as a standard email address. Possibly a bit slower then the Variant from ITS.Is EMail-Command.

Internally this command uses another technology (Regular Expressions).

 

Advanced Pattern Matching: Utilizes regular expressions for a detailed analysis of the email structure, capable of identifying specific patterns and characters.

International Support: Recognizes international characters and domain names, allowing validation of email addresses from different languages and regions.

Flexible Syntax: Can adapt to validate various email formats, including addresses with subdomains, new top-level domains, and tagged addresses (e.g., john.doe+tag@example.com).

The NTS. command is the counterpart and checks that the string is not a valid email format.

 

Example Use Case:

 

TST.Generate Test Email||$$N04

ITS.Is EMail|$$N04

DBP.$$N04 is a valid E-Mail.

ELS.

DBP.$$N04 is NOT a valid E-Mail.

EIF.

ENR.

 

The result would indicate:

john.doe@example.com is a valid E-Mail.

 

 

Syntax

 

 

ITS.Is EMail XP|P1 … ELS. … EIF.

NTS.Is EMail XP|P1 … ELS. … EIF.

 

 

 

Parameter Explanation

 

P1 - The variable containing the email string to be validated.

 

 

 

Example

 

'***********************************

' ITS.-Sample

'***********************************
' Generate a test email and store in $$N04

TST.Generate Test Email||$$N04

 

' Validate the email format

ITS.Is EMail XP|$$N04

 

' Output the validation result

DBP.$$N04 is a valid E-Mail.

ELS.

DBP.$$N04 is NOT a valid E-Mail.

EIF.

 

' End the script

ENR.

 

 

 

 

 

 

Remarks

 

-

 

 

Limitations:

ITS./NTS. can be nested to unlimited Depth, and they can also enclose Sub-Program Calls or FEX. (Enumerations) to unlimited Depth.

 

 

See also: