1

Hi can someone help me to put this regex in a validation rule

NOT(REGEX( Video_Title__c, "[?\b(?:word)\b]?"))

enter image description here

3

When using escape sequences like \b in regex in Salesforce, you need to add an extra backslash

so "\\]?\\b(?:word)\\b\\]?" in that REGEX() function would be syntactically correct, though perhaps not semantically correct. Perhaps you meant for that (?:word) to be (?:\\w)?

If you want to match a literal backslash, you need 4 backslashes \\\\

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.