Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Environment Options

Embedded Object Grooper.Extract

Provides configuration for merge variables and culture settings used by regex-based extractors.

Remarks

Overview

The Environment Options class controls how merge variables are resolved and how culture information is applied during extraction. Merge variables are referenced in regular expressions using the syntax @VariableName. These variables can represent lists of values, culture-specific data, or reusable regex fragments.

Built-In Merge Variables

Several built-in merge variables are available (see Variable Providers), exposing culture-specific lists such as @DayNames, @MonthNames, and @CurrencySymbols. For example, the @DayNamesAbbreviated variable expands to a list of day abbreviations appropriate for the current culture:

  • For English: Sun|Mon|Tue|Wed|Thu|Fri|Sat
  • For French: dim|lun|mar|mer|jeu|ven|sam

These variables adapt automatically to the culture of the document or to a specified override.

Custom Merge Variables

You can define custom merge variables by referencing Lexicons that contain the desired values or key-value pairs. Custom variables are useful for:

  • Merging in lists that are difficult to maintain directly in a regex.
  • Creating libraries of reusable regex snippets shared by multiple extractors.
  • Improving the readability and maintainability of complex patterns.
  • Enforcing consistency across multiple extractors.

To define custom variables, use the 'Value Lists' and 'Snippet Libraries' properties to reference appropriate Lexicons. Each lexicon entry becomes a merge variable, which can be injected into your regular expressions using the @VariableName syntax.

Culture Settings

The culture used for variable expansion can be controlled via the 'Culture Override' and 'Culture Scope' properties. By default, variables are generated using the culture of the input document, but you can force a specific culture or restrict processing to certain languages using these options.

This is especially useful when extracting data from mixed-language documents, or when you need to standardize extraction behavior across different locales.

Usage Guidance

  • Use built-in variables for common culture-specific lists.
  • Reference Lexicons to define custom lists or regex snippets as merge variables.
  • Adjust culture settings to match your extraction requirements, especially for multilingual or internationalized content.
  • For more details on configuring merge variables and culture options, see the documentation for Lexicons, Variable Providers, and the relevant properties of this class.

Properties

NameTypeDescription
Custom Merge Variables
Culture Settings

See Also

Used By

Notification