$regexMatch

Matches a string with the given Regex Pattern and returns the matched text or multiple matches seperated by the seperator

Usage: $regexMatch[text;regexp;flags(optional);group index(optional, 0 by default) or all;separator (optional)]

Note about Separator

It can only be used when group index is all.
in case flag is g it will return all matches glued with that separator
in case flag is not g it will return the whole matched text and matched groups

Example (Find the first number):

Member08/02/2024
!!exec $regexMatch[Rake owns 50$ and has 18 properties.;d+]

Custom Command Bot 08/02/2024
50

Example (Find all numbers):

Member08/02/2024
!!exec $regexMatch[Rake owns 50$ and has 18 properties.;d+;g;all;/]

Custom Command Bot 08/02/2024
50/18

Example (Find 2nd number only):

Member08/02/2024
!!exec $regexMatch[Rake owns 50$ and has 18 properties.;d+;g;1]

Custom Command Bot 08/02/2024
18

Regex Flags

These are all regex flags: g, i, m, u, s, y. ::

Function difficulty Medium
Tags: regex search find search match