You need to sign in to do that
Don't have an account?
Jagadesh Bandaru
regex for string validation
Hi,
I have to create a validation rule so that it will check the following conditions against:
1. The Length >2
2. Length<=20
3. It can only contain 2 alphabets (in any position).
This is what I wrote:
OR(LEN(abc__c)>20,LEN(abc__c)<3, Not( REGEX(abc__c,".2[a-zA-Z].2"))), which is not working.
Any help would be appreciated.
Regards,
Jagadesh
I have to create a validation rule so that it will check the following conditions against:
1. The Length >2
2. Length<=20
3. It can only contain 2 alphabets (in any position).
This is what I wrote:
OR(LEN(abc__c)>20,LEN(abc__c)<3, Not( REGEX(abc__c,".2[a-zA-Z].2"))), which is not working.
Any help would be appreciated.
Regards,
Jagadesh
I try this regular expression, I am able to get what you need. If needed you can play around with this and get to what you want.
Hope it helps
RD