Online documentation, manuals and tutorials
< All Topics
Print

Regexp

Description

Searches a set string or stream, using a pattern written according to the rules of the regular expression syntax.

Properties

Specific

Pattern

EXPRESSION (string)

Regular expression used for searching.

Text

EXPRESSION (string)

The text to be searched can be a string or a stream.

Global

EXPRESSION (boolean)

This option determines whether only the first occurrence of the pattern or every occurrence of the pattern is searched.

Case insensitive

EXPRESSION (boolean)

This option determines whether the search will be case sensitive or not.

Inputs

seqin

SEQ | OPTIONAL

A standard sequence input. This input needs to be used once at the beginning.

next

SEQ | OPTIONAL

Use this input to get the next match.

stop

SEQ | OPTIONAL

Use this input when we want to stop further searching, after which the Flow execution will immediately continue through the done output.

Outputs

seqout

SEQ | OPTIONAL

A standard sequence output.

match

DATA(struct:$RegExpResult) | MANDATORY

Search match in the form of struct:$RegexpMatch value is sent through this output. The $RegexpMatch structure has the following fields:

  • index (integer) – The 0-based index of the match in the string.
  • texts (array:string) – The array that has the matched text as the first item, and then one item for each capturing group of the matched text.
  • indices (array:array:integer) – It is an array where each entry represents the bounds of a substring match. The index of each element in this array corresponds to the index of the respective substring match in the texts array. In other words, the first indices entry represents the entire match, the second indices entry represents the first capturing group, etc. Each entry itself is a two-element array, where the first number represents the match’s start index, and the second number, its end index.

done

DATA(string) | OPTIONAL

Flow execution continues through this output when the search is complete, i.e. there are no more matches.

Examples

  • RegExp String
  • RegExp Stream
Page content