function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dane Kim 18Dane Kim 18 

Validation Rule to Detect Letters with Regex

Hey guys, 

Trying to use Regex to standardize account name format of 0#ABCDEF (i.e. 01BRACLU). Here's what I have:
 
LEN(Name) != 8
||
!(REGEX(LEFT(Name ,2),'[0][0-9]'))
||
!(REGEX(RIGHT(Name ,6),'[A-Z]'))

Any thoughts on why? The third line to catch the number format works, but the 5th line to catch letters doesn't. 
Dane Kim 18Dane Kim 18
Nevermind - figured it out. Missing {6} for the number of characters to catch.