Open Source & Stuff  
  |     Main Site     |      Forum     |     Contact     |
Java script :  forum.Salix.gr forum.Salix.gr
Little scripts that might be helpful. It's more like a repository of commonly used functions. Have something you want to share? post it here!! 
Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
messageCheck if all digits are the same
Posted by: panos (IP Logged)
Date: July 07, 2006 04:28PM

    function areAllDigitsSame(testStr) {
        var outVal = true;
        var reg1;

        reg1 = "(^[1]+$)|(^[2]+$)"
        re = new RegExp(reg1);
        if( !re.test(testStr) )
            outVal = false;
        return(outVal);
    }



Sorry, only registered users may post in this forum.

All Rights Reserved 2006 Salix.gr  |  Design by Ades Design |  Hosting by e-emporio |  forum.Salix.gr powered by Phorum