Data Type to Search for Company Email Addresses

GLASS Studio Visual Builder mode WORD, NOCASE, RANGE, TIMES, BOUND

Overview

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.

Prerequisites

This tutorial assumes that you have:

  • A valid set of Ground Labs customer portal credentials to log in to GLASS Studio.

  • Working knowledge of Enterprise Recon.
  • A reasonable understanding of what a data type is.

Data Type Requirements

We will also make the following assumptions regarding the data type, along with the structure and format of company email addresses.

  1. The data type should match company email addresses (<mailbox>@example.com) case-insensitively.
  2. The length of a mailbox name is between 2 to 64 characters.
  3. Valid email addresses may contain a combination of ASCII alphabets and numbers (0-9a-zA-Z) in the mailbox name but the first character must be an alphabet (a-zA-Z).
  4. Email addresses should be bounded only by non-alphanumeric characters (^0-9a-zA-Z).
  5. Some examples of company email addresses that we expect to match:
    • employee1@example.com
    • support@example.com
    • jdoe@example.com

Company email address example requirements

Part 1 - First Character of the Mailbox Name

You will start by defining the GLASS expression that requires the first character of the mailbox name to be a letter.

  1. Launch GLASS Studio.
  2. In the start screen, select New Visual Builder Project +.
  3. Select Start with RANGE.
  4. In the Select a keyword dropdown, select Letter.
  5. Click Close.

Email address data type add first letter in mailbox name

Part 2 - Rest of the Mailbox Name

Next, you will build the rest of the mailbox name which (including the first letter) should be 2-64 characters long.

  1. Hover over and click on the + button at the top right corner of the first RANGE component.
  2. Select RANGE.
  3. In the Select a keyword dropdown, select Alnum.
  4. Check the Repeat Character/Octet option.
  5. Select the second radio button and key in 1 and 63 in the To and Times field respectively.
  6. Click Close.

Email address data type add rest of mailbox name

Part 3 - Email Domain

In Part 3, you will add the third component that defines the email domain.

  1. Hover over and click on the + button at the top right corner of the second RANGE component.
  2. Select WORD.
  3. In the text field, key in @example.com.
  4. Check the No Case option.
  5. Click Close.

Email address data type domain

Part 4 - Boundary Rules

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.

  1. Left click anywhere in the GROUP component.
  2. In the group form, click on Bound.
  3. For the Left option, in the Select a keyword dropdown, select Non-Alnum.
  4. For the Right option, in the Select a keyword dropdown, select Non-Alnum.
  5. Click Close.

Email address group boundary rules

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.

Part 5 - Testing the Data Type

1
2
3
Employee1,employee1@example.com,Marketing
Customer Support: support@example.com
123@example.com
  1. Copy the sample data provided above and paste it in the Enter test data: pane.
  2. Click Test.

Email address test sample data

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.

Part 6 - Using the Custom Pattern in Enterprise Recon

Now that you have tested the data type, click on the Copy to clipboard copy button to copy the (generated) GLASS code, which can now be deployed as a Custom Data Type in Enterprise Recon.

Email address copy GLASS code