Feedback

  • Contents
 

Pattern Matching with String Variables

Variables of the String data type support pattern matching, which prevents data entry errors by refusing to accept typed entries unless they conform to a certain pre-selected pattern. You can either select a standard pattern or create your own customized pattern. To select or create a pattern, use the Pattern list box in the Add Variable dialog box (see figure).

Standard patterns are:

  • Not Set: No pattern.

  • Custom: Lets you create a pattern by using the same regular expression syntax as in Perl. Regular expressions are outside the scope of this help topic. However, both the web and printed books offer abundant tutorial and reference information about regular expressions. Regular expressions in IPA Designer follow Perl syntax.

  • Alphabetic (lower case): This only accepts lower case letters. No spaces, digits, or punctuation are allowed.

  • Alphabetic (Mixed Case): This accepts upper case or lower case letters. No spaces, digits, or punctuation are allowed.

  • Alphabetic (UPPER CASE): This only accepts upper case letters. No spaces, digits, or punctuation are allowed.

  • Alphanumeric: This accepts any letters or digits. No spaces or punctuation are allowed.

To add a standard pattern to the definition of a string variable:

  1.  In the desired workspace, add the variable to display the Add Variable dialog box.

  2. As needed, add the other information in the dialog box.

  3. In the Pattern list, click the desired pattern.

  4. Click the Add button to create the string variable.

To add a custom pattern to a string variable:

  1. In the desired workspace, add the variable to display the Add Variable dialog box.

  2. As needed, add the other information in the dialog box.

  3. In the Pattern list, click Custom.

  4. The dialog displays two new fields under the Pattern list box (see figure).

  5. In the Name text box, type a name for the custom pattern.

    This makes the same pattern available later.

  6. In the Regular Expression text box, type the regular expression for the pattern.

    Regular expressions are beyond the scope of this help system. However, you can find tutorial and reference information about regular expressions on the web at sites such as http://www.regular-expressions.info. (Genesys does not endorse or recommend any such external site: this help system provides a URL only to help you get started.) Regular expressions in IPA Designer follow Perl syntax.

  7. Click the Add button to create the string variable.