Skip to main content

Flow Input Validation with REGEX gives syntax error

I'm trying to add validation to an Input field on a Flow Screen Element. The standard REGEX formula is ^A-Za-z0-9 \r\n@£$¥!\"#$%&'\(\)*\+,_.\/:;<=>?^{}\\\[~\]. In the Screen element, I have an input field called BlastBody, with Validation formula REGEX({!BlastBody},"[^A-Za-z0-9 \r\n@£$¥!\"#$%&'\(\)*\+,_.\/:;<=>?^{}\\\[~\]]"). When I save I get a Syntax error.

 

I read one post that says that we have to escape the \ of special characters, so I tried changing all the \ to \\ as recommended: REGEX({!BlastBody},"[^A-Za-z0-9 \\r\\n@£$¥!\\"#$%&'\\(\\)*\\+,_.\\/:;<=>?^{}\\\\\\[~\\]]") But that also gives me a syntax error.

 

Recommendations?

2 comments
0/9000