DataFlux Data Management Studio 2.7: User Guide

Regex Library Editor

Overview

Use the Regex Library Editor to maintain regular expression libraries (regex libraries). A regular expression is a pattern that is matched against a subject string from left to right. A regex library is a type of QKB file that contains regular expressions that follow Perl syntax. These expressions enable you to express how a pattern in a string should be detected and, optionally, replaced.

The next display shows the regular expressions in the EN Number Indicator Removal regex library in the English locale in the SAS Quality Knowledge Base for Contact Information 24.


Library in the Regex Library Editor

Use the menu or the toolbar to add new libraries, open existing libraries, or maintain the regular expressions in a library. The expression table displays any expressions in the current library. The Test Area enables you to see the results of applying the regex library to a text string. For example, in the previous display, the expression highlighted in light blue matched the Input String in the Test Area. The Result field shows how the input string was changed by the matching expression. The status bar at the bottom of the dialog displays the current locale, if one has been selected.

Menu

File

New - Enables you to create a new library. When you create a new library, you must specify a locale with which to associate the library. After you have specified a locale, you will be prompted to add at least one expression to the new library. For more information about adding a new library, see Adding and Editing Regex Libraries.

Open - Enables you to open a regex library in the current locale.

Close, Save, Save As, Exit - Enable you to perform these operations on the library in the editor.

Edit

These options enable you to maintain the regular expressions in a library. The options are inactive until you open a library.

Add Expression - Enables you to specify a new expression. Use Perl syntax for the expression and any substitution options. For more information about expression syntax, see Regular Expression Syntax in the Regex Library Editor.

Edit, Delete, Copy, Paste Expression - Enable you to perform these options on a selected expression.

Test

Go - Applies a selected expression to a string in the Input string field in the Test Area.

Clear - Removes current text from the Test Area.

Options

Set QKB - Displays the Select Locale dialog so that you can specify the locale where you want to add or maintain a QKB library.

Toolbar

Toolbar icons enable you to create, open, or save a regex library.

Expression Table

The expression table displays any expressions in the current library.

Regular Expression - Displays a regular expression in Perl syntax. If you select an expression, it is highlighted in dark blue. If an expression matches an input string in the Test Area, the expression is applied to the string, and the expression is highlighted in light blue. If multiple expressions match an input string in the Test Area, they are all highlighted in light blue.

Substitution - Displays a string that will replace the portion of the input string that is matched by the expression, if any. Note that as in Perl, a substitution string may contain back references.

Notes - Displays any notes about the expression.

For more information about maintaining expressions, see Adding and Editing Regex Libraries.

Test Area

The Test Area enables you to see the results of applying the regex library to a text string. Specify an input string and click Go to see the result.

Input string - Enables you to enter a string that will test the regex library.

Result - Displays the result of applying the regex Library to the input string. All expressions that matched the string and were applied to the sting are highlighted in light blue in the expression table.

Go - Applies the expressions in the regex library to a string in the Input string field in the Test Area.

Clear - Removes current text from the Test Area.

Related Topics

Documentation Feedback: yourturn@sas.com
Note: Always include the Doc ID when providing documentation feedback.

Doc ID: dfU_Cstm_RegEx_16000.html