Matchre

Description
Matches game text against a regex pattern. Supports the ability to use captures by referring to them as $1, $2, etc, for each successful match. When a match occurs, the script jumps to the target label with any captures available as described.

Must be used with matchwait.

Syntax
matchre

Parameters

 * label
 * target label to jump to when a match is found
 * pattern
 * regex pattern to compare with, allowing for captures to be used in the script

Examples
matchre wave (\w+) just arrive. matchwait

wave: put wave $1