Regex
Match the content of a string using a regular expression
Description
Matches the content of a string using a regular expression. It supports flags when regex
is surrounded by '/'.
Examples
For the text: We will, we will, rock you
regex we
produces a list with a single match: [we]
regex /we/i
matches two results: [We, we]
Inputs
- text (String): The text to be searched.
- regex (String): The pattern that we are looking for.
Outputs
- matched (Boolean):
true
if the pattern was matched within thetext
input - match elements (List): The list of elements matching the pattern.