It would be really useful if you added the ability to use regular expression for conditional statements.
These functions already exist:
string.replace(new RegExp(pattern, flags), replace)
replacex("Hello World", "l", "g", "X") => "HeXXo WorXd"
Split a string with a regular expression: splitx("Hello World", "\s") => ["Hello", "World"]
testx(string, regular_expression, flags) => boolean
testx(string, regular_expression) => boolean
extractx(string, regular_expression, flags, extract); extracts a substring from the given string
extractx(string, regular_expression, extract); extracts a substring from the given string
extractx(string, regular_expression); extracts a substring from the given string
Thank you for this information. I missed this in the documentation. I'm used to looking at it from a conditional checking statement vs a specific function.
Have you ever gotten "flags" to work in extractx()? Beyond capture groups, what does the "extract" argument represent and how do you access it. If you have an example where "flags" works, would you please post it. Thanks