Pattern Matching

Pattern Matching looks for a specified pattern within a user-defined value. You can use Pattern Matching to recognize social security numbers, telephone numbers, ZIP codes, or any other information that follows a specific pattern. It is also useful for looking for information that follows leading text: for example, looking for "Name:" and then extracting the text that comes after it. Another use is in reprocessing documents; for example, extracting a piece of information such as the date from a file name and entering it in a field. Pattern Matching works by "reading" through text strings to match patterns that are defined using Pattern Matching Expressions, also known as Regular Expressions. Pattern Matching can be used in Pre-Classification Processing, First Page Identification, Page Processing, Last Page Identification, or Post-Processing.

Note: When defining a pattern, you should only use the expressions defined in the Regular Expression Reference. Wildcards are not supported for this process. The behavior for wildcard characters is overridden by the behavior assigned to the same character(s) under Regular Expression Reference.

To use Pattern Matching

  1. In the Session Configuration Pane, select the stage of processing where you want to use Pattern Matching.
  2. In the Tasks Pane, select Pattern Matching.
  3. You can optionally enter a name for the process under Process Name.
  4. Move through each step of the wizard at the bottom of the pane. You can also click Skip Wizard to display and configure the properties all at once.
  5. Page Range: When configuring a process in Page Processing or Post-Processing, you will be prompted to specify a page range. In other stages, default settings will be automatically applied.
  6. Pattern Configuration: To configure a pattern, click Create Token. The New Token dialog box will open.
    • Specify the name for the token that will be created by the pattern match. The best practice is to choose a name that will help you remember the function of the process when reviewing the session later.
    • Choose whether to look for the pattern in an existing token value or the page text. If using a token value, you can use the token button (right arrow) to select tokens generated from the system or other processes in Quick Fields. If using page text, you can choose whether to run the pattern match on the entire page or specify a custom page range.
    • Specify a pattern to match. For a list of common expressions, click the pattern button. For more information, see the Regular Expression Reference.
    • To make the pattern match case sensitive, select Match case. To make it case insensitive, clear it.
    • Choose what to do when multiple matches exist for the pattern:

      • First match only: returns the first value that matches the pattern.
      • All matches (combined with no spaces): returns all values as a single-valued token.
      • All matches (as multi-value token): returns all values as a multi-valued token.

      You can use the Token Editor to extract particular values from multi-valued tokens.

    • To test the pattern, click the plus sign next to Test the pattern to expand the Test Value box. Specify a value that you expect to fit the pattern and the expected value will be displayed under Result value as you type.
    •  Under Action, you can specify what will happen if the input value does not match the pattern.

      • Mark fields that use this token as invalid: If this is selected, fields will be highlighted in red so you can address them during Revision.
      • Use the input value as the token value: If this is selected, the token will be modified to match the input value.
  7. Optional: To preview how this process will affect scanned images and OCRed or extracted text, test processes. For the best results, add a custom sample page before testing. Adjust and test until you are satisfied with the results.

    Note: If Pattern Matching is configured under Pre-Classification Processing, you will be able to right-click the text pane to access the Sample Pages menu.

Note: Some processes come with the basic Quick Fields installation, and some must be purchased as add-ons. Contact your reseller for more information.