Simple approach:
D:\>perl -lne "print /^[0-8]{9}$/ && !/(.)(?=.*\1)/ ? 'ok' : 'not ok'" 1234 not ok 1234567689 not ok 012345678 ok 018273645 ok 010101010 not ok ^Z
And with one regexp:
D:\>perl -lne "print /^(?:([0-8])(?!.*\1)){9}$/ ? 'ok' : 'not ok'" 123456780 ok 123123123 not ok 123456781 not ok ^Z
In reply to Re: RegEx Question
by grizzley
in thread RegEx Question
by yoda54
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |