Skip to main content

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&'*@\|^:,=!/`>{([<#%.+?"})]; ~_-]$")))

 

#REGEX #Validation Rule #Data Management

3 个回答
  1. 2021年7月14日 17:31

    Hi @Charles Porch III   

     

    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.

0/9000