Description:

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 value of the property must be a valid Regular Expressions with exactly one capturing group. If the Regular Expression matches more than once, only the first match will be used. 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: evaluate, Text, Regular Expression, regex, experimental

Properties:

In the list below, the names of required properties appear in bold. Anyother properties (not in bold) are considered optional. The table also indicates any default values, whether a property supports the NiFi Expression Language (or simply EL), and whether a property is considered "sensitive", meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the nifi.properties file has an entry for the property nifi.sensitive.props.key.

NameDescriptionDefault ValueValid ValuesELSensitive
Character SetThe Character Set in which the file is encodedUTF-8NoNo
Maximum Buffer SizeSpecifies the maximum amount of data to buffer (per file) in order to apply the regular expressions. Files larger than the specified maximum will not be fully evaluated.1 MBNoNo
Enable Canonical EquivalenceIndicates that two characters match only when their full canonical decompositions match.false
  • true
  • false
NoNo
Enable Case-insensitive MatchingIndicates that two characters match even if they are in a different case. Can also be specified via the embeded flag (?i).false
  • true
  • false
NoNo
Permit Whitespace and Comments in PatternIn this mode, whitespace is ignored, and embedded comments starting with # are ignored until the end of a line. Can also be specified via the embeded flag (?x).false
  • true
  • false
NoNo
Enable DOTALL ModeIndicates that the expression '.' should match any character, including a line terminator. Can also be specified via the embeded flag (?s).false
  • true
  • false
NoNo
Enable Literal Parsing of the PatternIndicates that Metacharacters and escape characters should be given no special meaning.false
  • true
  • false
NoNo
Enable Multiline ModeIndicates that '^' and '$' should match just after and just before a line terminator or end of sequence, instead of only the begining or end of the entire input. Can also be specified via the embeded flag (?m).false
  • true
  • false
NoNo
Enable Unicode-aware Case FoldingWhen used with 'Enable Case-insensitive Matching', matches in a manner consistent with the Unicode Standard. Can also be specified via the embeded flag (?u).false
  • true
  • false
NoNo
Enable Unicode Predefined Character ClassesSpecifies conformance with the Unicode Technical Standard #18: Unicode Regular Expression Annex C: Compatibility Properties. Can also be specified via the embeded flag (?U).false
  • true
  • false
NoNo
Enable Unix Lines ModeIndicates that only the ' ' line terminator is recognized int the behavior of '.', '^', and '$'. Can also be specified via the embeded flag (?d).false
  • true
  • false
NoNo

Relationships:

NameDescription
matchedFlowFiles are routed to this relationship when the Regular Expression is successfully evaluated and the FlowFile is modified as a result
unmatchedFlowFiles are routed to this relationship when no provided Regular Expression matches the content of the FlowFile