ExtractText 2025.10.2.19

Bundle

org.apache.nifi | nifi-standard-nar

Beschreibung

Evaluates one or more Regular Expressions against the content of a FlowFile. The results of those Regular Expressions are assigned to FlowFile Attributes. Regular Expressions are entered by adding user-defined properties; the name of the property maps to the Attribute Name into which the result will be placed. The attributes are generated differently based on the enabling of named capture groups. If named capture groups are not enabled: The first capture group, if any found, will be placed into that attribute name. But all capture groups, including the matching string sequence itself will also be provided at that attribute name with an index value provided, with the exception of a capturing group that is optional and does not match - for example, given the attribute name „regex“ and expression „abc(def)?(g)“ we would add an attribute „regex.1“ with a value of „def“ if the „def“ matched. If the „def“ did not match, no attribute named „regex.1“ would be added but an attribute named „regex.2“ with a value of „g“ will be added regardless. If named capture groups are enabled: Each named capture group, if found will be placed into the attributes name with the name provided. If enabled the matching string sequence itself will be placed into the attribute name. If multiple matches are enabled, and index will be applied after the first set of matches. The exception is a capturing group that is optional and does not match For example, given the attribute name „regex“ and expression „abc(?<NAMED>def)?(?<NAMED-TWO>g)“ we would add an attribute „regex. NAMED“ with the value of „def“ if the „def“ matched. We would add an attribute „regex. NAMED-TWO“ with the value of „g“ if the „g“ matched regardless. The value of the property must be a valid Regular Expressions with one or more capturing groups. If named capture groups are enabled, all capture groups must be named. If they are not, then the processor configuration will fail validation. If the Regular Expression matches more than once, only the first match will be used unless the property enabling repeating capture group is set to true. If any provided Regular Expression matches, the FlowFile(s) will be routed to ‚matched‘. If no provided Regular Expression matches, the FlowFile will be routed to ‚unmatched‘ and no attributes will be applied to the FlowFile.

Tags

Regulärer Ausdruck, Text, auswerten, extrahieren, Regex

Eingabeanforderung

REQUIRED

Unterstützt sensible dynamische Eigenschaften

false

Eigenschaften

Eigenschaft

Beschreibung

Zeichensatz

Der Zeichensatz, in dem die Datei codiert ist

Enable Canonical Equivalence

Gibt an, dass zwei Zeichen nur dann übereinstimmen, wenn ihre vollständigen kanonischen Zerlegungen übereinstimmen.

Enable Case-insensitive Matching

Indicates that two characters match even if they are in a different case. Can also be specified via the embedded flag (?i).

Enable DOTALL Mode

Indicates that the expression ‚.‘ should match any character, including a line terminator. Can also be specified via the embedded flag (?s).

Enable Literal Parsing of the Pattern

Gibt an, dass Metazeichen und Escape-Zeichen keine besondere Bedeutung haben sollen.

Enable Multiline Mode

Indicates that ‚^‘ and ‚$‘ should match just after and just before a line terminator or end of sequence, instead of only the beginning or end of the entire input. Can also be specified via the embeded flag (?m).

Enable Unicode Predefined Character Classes

Specifies conformance with the Unicode Technical Standard #18: Unicode Regular Expression Annex C: Compatibility Properties. Can also be specified via the embedded flag (?U).

Enable Unicode-aware Case Folding

When used with ‚Enable Case-insensitive Matching‘, matches in a manner consistent with the Unicode Standard. Can also be specified via the embedded flag (?u).

Enable Unix Lines Mode

Indicates that only the ‚line terminator is recognized in the behavior of‘. ‚,‘^ ‚, and‘$‘. Can also be specified via the embedded flag (?d).

Enable named group support

If set to true, when named groups are present in the regular expression, the name of the group will be used in the attribute name as opposed to the group index. All capturing groups must be named, if the number of groups (not including capture group 0) does not equal the number of named groups validation will fail.

Enable repeating capture group

Wenn diese Einstellung auf „true“ gesetzt ist, wird jede Zeichenfolge, die mit den Erfassungsgruppen übereinstimmt, extrahiert. Andernfalls wird bei mehreren Übereinstimmungen mit dem regulären Ausdruck nur die erste Übereinstimmung extrahiert.

Include Capture Group 0

Gibt an, dass Erfassungsgruppe 0 als Attribut enthalten sein soll. Capture Group 0 steht für die Gesamtheit der Übereinstimmung mit dem regulären Ausdruck, wird normalerweise nicht verwendet und kann sehr lang sein.

Maximum Buffer Size

Gibt die maximale Datenmenge an, die (pro FlowFile) gepuffert werden soll, um die regulären Ausdrücke anzuwenden. FlowFiles, die größer als das angegebene Maximum sind, werden nicht vollständig ausgewertet.

Maximum Capture Group Length

Gibt die maximale Anzahl von Zeichen an, die ein bestimmter Erfassungsgruppenwert haben kann. Alle Zeichen, die über das Maximum hinausgehen, werden abgeschnitten.

Leerzeichen und Kommentare in Mustern zulassen

In this mode, whitespace is ignored, and embedded comments starting with # are ignored until the end of a line. Can also be specified via the embedded flag (?x).

Beziehungen

Name

Beschreibung

matched

FlowFiles werden an diese Beziehung weitergeleitet, wenn der reguläre Ausdruck erfolgreich ausgewertet und das FlowFile daraufhin geändert wurde.

unmatched

FlowFiles werden an diese Beziehung weitergeleitet, wenn kein angegebener regulärer Ausdruck mit dem Inhalt des FlowFile übereinstimmt.