in reply to Re: RegEx Question
in thread RegEx Question

Simple approach:
D:\>perl -lne "print /^[0-8]{9}$/ && !/(.)(?=.*\1)/ ? 'ok' : 'not ok'"

This is short and very clever, but "simple"? I think NOT.
Also, I didn't see in the OP spec that this was an exact sequence of 9 digits.

Replies are listed 'Best First'.
Re^3: RegEx Question
by grizzley (Chaplain) on Sep 10, 2009 at 12:11 UTC
    Well, its simplier than the second approach :>
    And sequence of 9 or 8 digits is mentioned in discussion above