09.06.2020, 11:32 fxtd

When writing regular expressions in VEX, use raw strings. Write the character r before the regex line:

string num = re_find(r"(\d+)$", s);

When using groups in the re_replace() function, also use raw strings and \1 syntax to get groups. $1 syntax from the help does not work:

s@material = re_replace(r".(.).*$", r"\1", s@name);