This script is actually based on a script by epol29. That was titled 'Script to count the number of Yes/No in the string', which I found to be an awsome script.
Anyway, this script uses the same logic to deterimine if all of the characters in a field are the same. For example, 1111111, aaaaaaaa, 4444, 22, 77777.
It works by replacing all chars by that match the first char with a blank. If all chars are replaced, you are left with a zero length result. So, all you have to do is check to see if the length is 0, if it is, then true, else false.
Hope this helps someone.
2007-10-02 (first published: 2002-06-20)
15,451 reads