Regex Extract
Runs on: Shared (backend or chatbox overlay).
Runs a regular expression against a string and outputs part of the match. Use it to pull the number out of !bet 500, strip a username from a message or isolate a URL. If nothing matches, the flow branch stops so empty results never reach downstream nodes.
Inputs
| Name | Type | Description |
|---|---|---|
input | string | The string to search. |
Outputs
| Name | Type | Description |
|---|---|---|
output | string | The text from the chosen capture group, or the full match for group 0. |
Configuration
- Pattern: The regular expression. Parentheses define capture groups. For example,
!bet\s+(\d+)captures the number after!bet. - Flags: Regex flags. Use
ifor case-insensitive matching. - Group: Which group to return.
0is the full match,1the first capture group,2the second, and so on.
Example
A Chat Command trigger fires for !bet. Connect the message text to a Regex Extract node with the pattern !bet\s+(\d+) and Group 1 to get the number the viewer typed, such as "500". Feed it into a To Number node, then a variable setter.