Description

Extractor node takes in a string input and extracts the part of it corresponding to the first capturing group of the regex. If there is no such part, an empty string is extracted.

For the extractor node to extract the group, the regex must:

  • be valid (obviously),
  • match the input, and
  • have at least one capturing group.

In pseudocode, what the node does is

try {
  let r = regEx.compile();
  return r.captures(nodeInput).get(1); // 1 for first capturing group in most languages
} catch (Error e) {
  return "";
}