You are here: Customizing Quality Knowledge Bases>Customize - Regex Editor>Building Regex Libraries

DataFlux Data Management Studio 2.5: User Guide

Customize - Regex Library Editor - Building Regex Libraries

  1. Open the Regex Library Editor. On the Customize main screen, select Tools > Other QKB Editors > Regex Library Editor. The Regex Library Editor dialog appears.
  2. Set a QKB. Select Options > Set QKB. The Regex Library Editor window appears. Select the appropriate QKB and locale and click Open. The QKB and locale setting is saved from session to session, so you do not need to specify it again unless you need to build a Regex Library file for a different locale.
  3. Create a New Regex Library File. Select File > New.
  4. Add Your Regular Expressions. By default, when you create a new Regex Library file, the Regex Library Editor will ask you to supply the first Regular Expression/Substitution pair. Type the Regular Expression and the Substitution in the appropriate fields and click OK.

    Before you add more regular expressions, be aware that regular expressions will be applied sequentially in the order in which they appear in the Regex Library. So, it is possible that a value could be modified by one regular expression, and then the result of that modification could be modified again by a regular expression that appears further down. This could occur several times as DataFlux Data Management Studio applies each regular expression from top to bottom. Therefore, you should be careful not to subvert the effects of one regular expression with another.

    With that in mind, all new regular expression rules are added to the end of the list. Click on the newly created row and drag the rule to the desired position in the list. Repeat this process until you have defined all your regular expressions.
  5. Save Your Regex Library. Select File > Save. Because this is a new Regex Library, the Regex Library Editor will prompt you for a file name.
  6. Test Your Regex Library. After creating a Regex Library, you can use the Regex Library Editor to test your expressions. At the bottom of the Regex Library is the Test Area, which allows you to type sample input strings to verify that you have written your regular expressions correctly. Type an input string and observe the result. If the result is not what you intended, you can modify your regular expressions or their order and re-test. When you are satisfied with the results, be certain to save your changes. Note that your input string in the Test Area is highlighted where it appears in your regular expressions.

Related Topics

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

Doc ID: dfU_Cstm_RegEx_16001.html