in reply to Regex Validation

Readable solution, but scans entire string:

if (grep $_!=2, map length, /(:+)/g) { die }

Stops at first error:

if (/: (?: :: | (?<!::)(?!:) )/x) { die }