# P_regexmatch
## Syntax:
@regexmatch**({pattern}, {text})**
## Use Case:
Performs a regex match and populates the global 'RegexSubMatches' array with any capture groups found. Returns the full match string.
## Arguments:
- **{pattern}**: The regex pattern (with groups).
- **{text}**   : The text to match.
## Examples:
1. **/var {full} {@regexmatch((\d+)hp, 100hp)}**
## See Also:
regex