This scenario uses two components, a tLibraryLoad and a tJava. The goal of this scenario is to check the format of an e-mail address and verify whether the format is valid or not.
In the Palette, open the Custom_Code folder, and slide a tLibraryLoad and tJava component onto the workspace.
Connect tLibraryLoad to tJava using a Trigger > OnSubjobOk link.
Double-click on tLibraryLoad to display its Basic settings. From the Library list, select jakarta-oro-2.0.8.jar.
In the Import field of the Advanced settings tab, type import org.apache.oro.text.regex.*;
Double-click on tJava to display its Component view.
In the Basic settings tab, enter your code, as in the screenshot below. The code allows you to check whether the character string pertains to an e-mail address, based on the regular expression: