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

Regular Expression

Grooper Object Grooper.Core

Defines a regular expression for pattern matching and extraction.

Remarks

The RegularExpression class provides a configurable way to define and apply regular expressions for extracting, matching, or validating text within Grooper. It supports advanced features such as prefix and suffix patterns, named output groups, and .NET RegexOptions.

Overview

  • Use this class to define a regular expression pattern for locating and extracting data from text.
  • Supports optional prefix and suffix patterns to further constrain matches.
  • Allows selection of a named group as the output value, enabling extraction of specific subcomponents.
  • Exposes .NET RegexOptions for case sensitivity, multiline, and other behaviors.

How It Works

  1. The main 'Pattern' property defines the core regular expression.
  2. If 'Prefix Pattern' or 'Suffix Pattern' are set, they are combined with the main pattern to require context before or after each match.
  3. The regular expression is compiled using the specified 'Options'.
  4. When matching, if 'Output Group' is set, only the value of that named group is returned; otherwise, the full match is used.

Usage Guidance

  • Use the 'Pattern' property for the main expression.
  • Use 'Prefix Pattern' and 'Suffix Pattern' to require context (such as a label or delimiter) before or after the match.
  • Set 'Output Group' to extract a specific named group from the match.
  • Adjust 'Options' for case sensitivity, multiline, and other behaviors as needed.

Properties

NameTypeDescription

Derived Types

There are 2 implementations of Regular Expression.

Attribute Rule Configures how attributes are applied to HTML elements during Condition HTML processing.
Wrap Rule Matches a text pattern in the HTML text nodes

Used By

Notification