I am trying to write a boolean function to support double colons ::
only for a string. It should reject any string with non-consecutive colon or more than two consecutive colons. The appearance of double colons can be any number. I can write regex which supports double colons but I don't know how to reject so many combinations of non-consecutive and consecutivec colons. Any idea is appreciated!
Valid inputs: Customer::Table
, Customer::Table::Sub
Invalid inputs: Customer:Table
, Customer::Table:Sub
, Customer::::Table