Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Treatment capture

regex::capture


Parameters

↳ var regex: string

Inputs

⇥ text: Stream<string>

Outputs

↦ captured: Stream<Option<StringMap>> (std/data/string_map::StringMap)
↦ error: Block<string>


Captures groups of text according to a regex.

Every string coming through the text stream is passed through regex. captured contains the named groups contents (or none if group is not captured). error is emitted only if regex contains error.

The regex syntax is Unicode-aware. Please refer to Regex Syntax in documentation for full syntax description.