DataFlux Data Management Studio 2.7: User Guide
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. Regex libraries have many uses in a QKB definition. They can be used to conduct pattern-based searches in strings and for purposes of categorization. They can be used to perform conditional pattern-based transformations of strings. They can also be used to normalize words for lookup in schemes and vocabularies.
The next display shows the regular expressions in the EN Number Indicator Removal library in the English locale in the SAS Quality Knowledge Base for Contact Information 24.
Example Regex Library
Regular expressions that you create in the Regex Library Editor must adhere to the syntax defined for Perl regular expressions. For details about this syntax, see Regular Expression Syntax in the Regex Library Editor.
The next display shows the EN Number Indicator Removal library in the context of the Address match definition in the English (United States) locale in the SAS Quality Knowledge Base for Contact Information 24.
Regex Library in a QKB Definition
When you open a QKB in DataFlux Data Management Studio, the contents of the QKB are displayed in a set of tabs on the right-hand side of the screen. The Regex Libraries tab shows a list of regex libraries that are contained in the QKB.
The list of libraries in the Regex Libraries tab has several columns, as shown in the next display.
Main Columns for the Regex Library Tab
The Name column shows the name of a regex library. The Description column contains text about the library. The File column contains the physical path to the library file.
The Locale column shows the QKB locale with which the library is associated. Note that a regex library might be listed even if it is not associated with the locale that you have selected in the Quality Knowledge Bases tree. This is because locales can inherit regex libraries from ancestors.
If you select a locale and look at the values in the Locale column for a regex library, you will see that some libraries are associated directly with the selected locale, while others are associated with the locale’s language, and still others are associated with the Global set of objects. This information is also presented in the icons that are shown for the libraries in the list. As shown in the previous display, if an icon has a flag overlay, the library is associated directly with a locale. If the icon has a word balloon overlay, it means that the library is associated with a language. An earth overlay means that the library belongs to the Global set of regex libraries.
If you wish to view only the regex libraries that are associated with a language, select that language in the tree for your QKB in the Administration riser.
If you wish to view only the regex libraries in the Global set, click on Global in the tree for your QKB.
To find a regex library with a specific name, click the Find icon (binocular icon) in the lower toolbar. This will toggle on the Find pane. To toggle off the Find pane, click the Find icon again.
You can rename a regex library by right-clicking the name and selecting Rename from the context menu. You can also click the name and select Rename from the action menu on the lower toolbar.
You can make a copy of a regex library by right-clicking the name and selecting Duplicate from the context menu. You can also click the name and select Duplicate from the action menu on the lower toolbar.
To create a new regex library, click the New Regex Library button on the lower toolbar, or select New Regex Library from the action menu on the lower toolbar. The New Regex Library wizard opens. Specify a name, description, and a locale for the new library. After you have saved this information, the new library appears in the regex library list, and the Regex Library Editor opens. Enter one or more expressions to the library. For details about this task, see Adding and Editing Regex Libraries.
To open a regex library for editing, double-click on the library in the list, or select the library and click the Open icon on the lower toolbar. You might also select the library and choose Open in the context menu or in the action menu on the lower toolbar. Add or update expressions in the library. For details about this task, see Adding and Editing Regex Libraries.
To view a list of QKB definitions that use a given regex library, select the library and choose Usage in the context menu or in the action menu on the lower toolbar. The usage dialog displays a list of the definitions that use the selected library.
To delete a regex library, select the library and click the delete icon in the lower toolbar, or choose Delete from the context menu or in the action menu in the lower toolbar. The library is removed from the QKB.
Documentation Feedback: yourturn@sas.com
|
Doc ID: DMCust_RegexLib_Nav.html |