Pattern Builder Window
The Pattern Builder window is where you specify the exact criteria for which the Data Extractor is searching when it is determining whether or not a line of text in the report should be defined as a particular line style.
The Pattern Builder Window is accessed from the Look For? cell in the Line Style Definition Window when you click the down arrow.
Available options in the Pattern Builder window are:
Edit
The menu in the upper left corner allows you to paste text from the white pane of the data display into the Value field. The paste function is only available when the Type is literal.
Type
There are five types of criteria the Data Extractor looks for. The five options are literal, character class, negated character class, mask, and regular expression.
literal
Select this option to have the Data Extractor search for some specific string of text. The string will be entered in the Value column.
character class
Select this option to have the Data Extractor search for some classification of characters, digits, or other type of criteria. A character class may be any of the classes or types of information listed below in the Value section, or a user may enter any valid string to specify their own character class.
negated character class
Select this option to have the Data Extractor search for anything EXCEPT some classification of characters, digits, or other type of criteria. A character class may be any of the classes or types of information listed below in the Value section, or a user may enter any valid string to specify their own character class.
mask
Select this option if you need to enter a special expression to define the search criteria. There are three special symbols that you may use along with any printable character to build the mask. The special symbols are @, #, and *. Each is explained below.
| Symbol | Description |
|---|---|
| @ | Use the @ (at sign) when you want the Data Extractor to search for any alpha character. For each @ entered in the mask, the Data Extractor searches for [A - Za - z]. |
| # | Use the # (pound sign) when you want the Data Extractor to search for any digit. For each # entered in the mask, the Data Extractor searches for [0 - 9]. |
| * | Use the * (asterisk) when you want the Data Extractor to search for any alphanumeric character or digit. For each * entered in the mask, the Data Extractor searches for [A - Za - z0 - 9]. |
Any printable ASCII character (except the three special characters shown above) and spaces can be used as a literal in combination with the three special characters to build the mask.
Some mask examples:
To set up the criteria for any Canadian postal code, enter a mask of @#@ #@#. This mask looks for [A - Za - z][0 - 9] [A - Za - z] (space) [0 - 9] [A - Za - z][0 - 9]
To set up the criteria for any social security number, enter a mask of ###-##-####. This mask looks for [0 - 9] [0 - 9] [0 - 9] - [0 - 9] [0 - 9] - [0 - 9] [0 - 9] [0 - 9] [0 - 9]
regular expression
Select this option if you want to use a language that allows you to specify a string of characters that defines a set of rules for matching character strings. A regular expression will match a field whether it matches the whole field or just a small sequence within the field.
The following are the special characters that can be used in Data Extractor regular expressions:
| (and) * + ? [and] - . \ ^ $
To use the literal value of a special character within a regular expression, you must precede the special character with a backslash ( \ ). For example, to enter a literal backslash, you must type it twice ( \\ ); to enter a literal dollar sign, you must type backslash and then dollar sign ( \$ ).
Example:
To set up the criteria for a four-column line position test, enter (0[0-9])(1[1-5]) OR 0[0-9]1[1-5]. This expression would find a line number with the first position of 0, the second position of 0-9, the third position of 1, and the fourth position of 1-5. Yielding up to 50 different hits.
Value
If you selected literal in the Type column, the value entered here is the exact string for which you want the Data Extractor to search. When entering the value, type only the exact string. This is case sensitive. The Data Extractor automatically encloses the value in quotation marks. Also see "Set Value = Selected Report Text".
If you highlighted a section of the text before opening the Line Style Definition window, that value is generally entered here automatically.
When you select character class, negated character class or regular expression in the Type column you must either make a selection from the list box in the Value column or enter your own string. Remember, negated character class means anything EXCEPT what you specify in the Value column.
The options in the Value column list box follow:
| Option | Description |
|---|---|
| any character | Select this option to have the Data Extractor search for any printable or non-printable character. |
| digits | Select this option to have the Data Extractor search for any of the digits zero (0) through nine (9). |
| digits/ | Select this option to have the Data Extractor search for any of the digits zero (0) through nine (9) or a forward slash (/). |
| digits- | Select this option to have the Data Extractor search for any of the digits zero (0) through nine (9) or a hyphen (-). |
| digits/- | Select this option to have the Data Extractor search for any of the digits zero (0) through nine (9) or a forward slash (/) or a hyphen (-). |
| letters | Select this option to have the Data Extractor search for any printable alphabetical character (a - z or A - Z). |
| upper case letters | Select this option to have the Data Extractor search for any printable upper case alphabetical character (A - Z). |
| lower case letters | Select this option to have the Data Extractor search for any printable lower case alphabetical character (a - z). |
| alphanumeric characters | Select this option to have the Data Extractor search for any printable alphabetical character (a - z or A - Z) or any digit from zero (0) through nine (9). |
| letters and white space | Select this option to have the Data Extractor search for any printable upper or lower case letter (A-Z or a-z) and white space. |
| upper case letters and white space | Select this option to have the Data Extractor search for any printable upper case letter (A-Z or a-z) and white space. |
| lower case letters and white space | Select this option to have the Data Extractor search for any printable lower case letter (A-Z or a-z) and white space. |
| white space | Select this option to have the Data Extractor search for a Tab (hex 09 or ANSI 009) or some designated number of spaces. |
| space | Select this option to have the Data Extractor search for a single space. |
| tab | Select this option to have the Data Extractor search for a tab character (hex 09 or ANSI 009). Tab expansion must be set to 0 on the Printer Emulation tab in the Source Options window in order for the Data Extractor to detect Tab characters in the file. |
| carriage return | Select this option to have the Data Extractor search for a carriage return (hex 0D or ANSI 013). |
Count
The count determines how many of the specified string(s) the Data Extractor searches for.
It is important to note that Count searches for consecutive values. For example, if you search on the string MM/DD/YY using the following settings in the Pattern Builder, no matching results display:
- Type=character count
- Value=alphanumeric
- Count=3
There is no match because MM/DD/YY does not contain 3 consecutive alphanumeric characters.
Here are the Count options:
| Option | Description |
|---|---|
| 0 - many | Select this option if you want the Data Extractor to search for "None" to "Many" of the specified string(s). |
| 1 - many | Select this option if you want the Data Extractor to search for "One" to "Many" of the specified string(s). |
| 0 - 1 | Select this option if you want the Data Extractor to search for "None" to "One" of the specified string(s). |
| 1 thru 9 | Select any of these options when you want the Data Extractor to search for a specific number of the specified string(s). If you want the Data Extractor to search for more than 9 of a specified value, type the number desired in this cell. |
Begin
This is the column number in which the Data Extractor should start searching for the specified string. If you modify the string in the Value column, you may need to enter a new column number here. Values only appear in the Start cell when Column is selected in Search What?. For more information about the Begin option, see Begin (line or column).
End
This is the column number in which the Data Extractor should stop searching for the specific string. If you modify the string in the Value column, you may need to enter a new column number here. Values only appear in the End cell when Column is selected in Search What?. For more information about the End option, see End (line or column).
Your transaction secured by high-grade AES-256 encryption.