Open martkaczmarek opened 7 months ago
Someone else has this regex:
match(value,"\b([A-ZÀ-ÿ][-,a-z. '_]+[ ()]*)+")
I tried to add a double backslash, but to no avail. match(value, "^\d+$") works, but match(value,"\b([A-ZÀ-ÿ][-,a-z. '_]+[ ()]*)+") not.
Maybe there are more characters that are problematic?
Stale issue message
Is there an existing issue for this?
Version of Corteza
2023.9.4
Current Behavior
When using match() function in field validation, the regex definition containing backslashes must have these backslashed doubled to work. For example, a single regex that should return true on digits:
^\d+$
throws an error: if I define the digits in another way, it works fine:^[0-9]+$
Adding a second backslash to the original regex seems to fix it:^\\d+$
Expected Behavior
match() function should accept raw regex expression, without the need to double-escape special characters.
Steps To Reproduce
match(value, "^\d+$")
Environment and versions
No response
Anything else?
No response