I want to allow these special characters: & ' * @ \ | ^ : , $ = ! / ` > - { ( [ < # % . + ? " } ) ] ; ~ _ and a blank space
Here is the validation I have but still getting Syntax error:
NOT(REGEX( Field Name ,"^[a-z A-Z&'*@\|^:,=!/`>{([<#%.+?"})]; ~_-]$")))
3 risposte
REGEX are sometimes very clunky but it does work very well if it comes to validation. For example, in your case, every character has its own functionality but if we want to pass through that special character we need to pass with \ backslash.
Try to use this:
NOT(REGEX(Field Name ,"^[a-zA-Z&'*@|^:,;~_\\-=!\\/`>{}()\\[\\]<#%.+?\"]$"))Note: You may use character class “[^\w]” but again in your case you want to consider only specific characters to pass through.
Thanks.