Loading...
Searching...
No Matches
Regex node
Grammar nodes

A node that matches input against a regular expression. More...

Collaboration diagram for Regex node:

## Functions

struct ec_node * | ec_node_re (const char *id, const char *str)
| Create a regular expression node.
int | ec_node_re_set_regexp (struct ec_node *node, const char *re)
| Set the regular expression on a regex node.

## Detailed Description

A node that matches input against a regular expression.

Configuration Schema

schema re {
string pattern {
description "The pattern to match.";
}
}

## Function Documentation

## ec_node_re()

struct ec_node * ec_node_re | ( | const char * | id,
|  | const char * | str )

Create a regular expression node.

Parameters

  id | The node identifier.
  str | The regular expression pattern (POSIX extended regex).

Returns
  The node, or NULL on error (errno is set).

## ec_node_re_set_regexp()

int ec_node_re_set_regexp | ( | struct ec_node * | node,
|  | const char * | re )

Set the regular expression on a regex node.

Parameters

  node | The regex node.
  re | The regular expression pattern. It is duplicated internally.

Returns
  0 on success, -1 on error (errno is set).