0

I have the following validation rule with regex expression. I have tested the expression working to my need but can't able save this coming up with syntax error could someone help me to get this cleaned.

AND(
ISPICKVAL(Status__c, 'Processing'),
$RecordType.Name = "Carer Card", 
NOT(ISBLANK( Carers_Other_Phone__c)), NOT(REGEX( Carers_Other_Phone__c, "^(\(((0|\+61(\ |-){0,1}0{0,1})(2|4|3|7|8)){0,1}\)|((0|\+61(\ |-){0,1}0{0,1})(2|4|3|7|8)){0,1}|((\+61(\ |-){0,1}\(0{0,1})(2|4|3|7|8)){0,1}\))(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{1}(\ |-){0,1}[0-9]{1}$")))
0

It just needs \\ is all escapes.

AND( 
ISPICKVAL(Status__c, 'Processing'), 
$RecordType.Name = "Carer Card", 
NOT(ISBLANK( Carers_Other_Phone__c)), NOT(REGEX( Carers_Other_Phone__c, "^(\\(((0|\\+61(\\ |-){0,1}0{0,1})(2|4|3|7|8)){0,1}\\)|((0|\\+61(\\ |-){0,1}0{0,1})(2|4|3|7|8)){0,1}|((\\+61(\\ |-){0,1}\\(0{0,1})(2|4|3|7|8)){0,1}\\))(\\ |-){0,1}[0-9]{1}(\\ |-){0,1}[0-9]{1}(\\ |-){0,1}[0-9]{1}(\\ |-){0,1}[0-9]{1}(\\ |-){0,1}[0-9]{1}(\\ |-){0,1}[0-9]{1}(\\ |-){0,1}[0-9]{1}(\\ |-){0,1}[0-9]{1}$")))

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.