WORD,
NOCASE, RANGE,
TIMES, BOUND
Imagine you are tasked to use GLASS Studio to create a custom
GLASS data type that will match (case-insensitively)
company email addresses with the format <mailbox>@example.com
.
In this tutorial, you will go through the steps to build and test the company email address data type in Visual Builder mode. The resulting GLASS expression can then be deployed as a Custom Data Type in Enterprise Recon.
This tutorial assumes that you have:
A valid set of Ground Labs customer portal credentials to log in to GLASS Studio.
We will also make the following assumptions regarding the data type, along with the structure and format of company email addresses.
<mailbox>@example.com
)
case-insensitively.0-9a-zA-Z
) in the mailbox name but the first character must be an
alphabet (a-zA-Z
).^0-9a-zA-Z
).employee1@example.com
support@example.com
jdoe@example.com
You will start by defining the GLASS expression that requires the first character of the mailbox name to be a letter.
Next, you will build the rest of the mailbox name which (including the first letter) should be 2-64 characters long.
In Part 3, you will add the third component that defines the email domain.
In Part 4, you will be adding boundary rules for the whole expression.
Using the BOUND operator, you can reduce the number of potential false positive matches by only reporting email address matches if they are surrounded by non-alphanumeric characters.
Congratulations! You have now fulfilled all the data type requirements and
built a working data type that will match email addresses with the domain
@example.com
.
1 2 3 |
Employee1,employee1@example.com,Marketing Customer Support: support@example.com 123@example.com |
You should expect to see the results indicating 2 MATCHES FOUND for the
emails employee1@example.com
and support@example.com
.
123@example.com
will not be reported as a match since the first character in
the mailbox name is a number when a letter is expected.
Now that you have tested the data type, click on the
Copy to clipboard
button to copy the (generated) GLASS code, which can now
be deployed as a Custom Data Type in
Enterprise Recon.