As soon as I sent this I realized what was happening. It's testing for any
occurence of 3 or more of ANY letter or number. So any string with 3 or more
characters will always match.
Do I have to loop over each string and check character by character?
!//--
andy matthews
web
For (strKey in FORM){
FORM[ strKey ] = REReplaceNoCase(
FORM[ strKey ],
([\w]{1})(\1{2,}),
\1,
ALL
);
}
This gets the first group (which is any letter or digit) and checks to
see if that is followed by 2 or more instances of that letter. If so,
then it is replaced with a
PROTECTED]
Sent: Tuesday, October 03, 2006 3:27 PM
To: CF-Talk
Subject: RE: Preventing long strings of one character
For (strKey in FORM){
FORM[ strKey ] = REReplaceNoCase(
FORM[ strKey ],
([\w]{1})(\1{2,}),
\1,
ALL
);
}
This gets the first group (which is any letter or digit
PROTECTED]
Sent: Tuesday, October 03, 2006 3:27 PM
To: CF-Talk
Subject: RE: Preventing long strings of one character
For (strKey in FORM){
FORM[ strKey ] = REReplaceNoCase(
FORM[ strKey ],
([\w]{1})(\1{2,}),
\1,
ALL
);
}
This gets the first group (which is any letter or digit) and checks
.
..
Ben Nadel
Certified Advanced ColdFusion Developer
www.bennadel.com
-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 4:31 PM
To: CF-Talk
Subject: RE: Preventing long strings of one character
Well now. That was easy enough. So using
5 matches
Mail list logo