So in essence, you don't want to match if a character repeats

sub check {
  return 1 if $_[0] !~ /(.).*\1/;
  return 0;
}

print check ('cCdE'), "\n"; # prints 1
print check ('cCcE'), "\n"; # prints 0
print check ('cEdE'), "\n"; # prints 0

Good luck
Tanton

-----Original Message-----
From: Michel Blanc
To: [EMAIL PROTECTED]
Sent: 8/22/2001 12:12 AM
Subject: Regex help

Dear All,

Does anyone could help in mathing one of the following letters

cCdeEfGhiI

any number of times, but if a letter has already matched, it can repeat
again in the string.

For instance :

cCdE    : match
cCcE    : doesn't match

Any clue anyone ?

Thanks,

Michel

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to