// Note: + - should be english letter , not +,-
str = "ncye('102') +ye('101')";
str = "ncye('102')- ye('101')";
if(/^ncye\('\d+'\)\s?[\+-]\s?(nc)?ye\('\d+'\)$/.test(str)) alert("正确");

解决方案 »

  1.   

    jscript,vbscript and 正则表达试的资料
    http://download.microsoft.com/download/winscript56/Install/5.6/W982KMe/CN/scd56chs.exe
      

  2.   

    你到google上搜一下
    http://come.6to23.com/fayu/kjsk/php/syjq/030.htm
      

  3.   

    我自己作的正则表达式测试工具
    http://expert.csdn.net/Expert/TopicView1.asp?id=1043056
      

  4.   

    <script>
    alert(/^\s*([^\s]+)\s*$/.test("  abc"))
    </script>
      

  5.   

    <script>
    alert(/^\s*d{4}年[1-9][0-2]*月\s*/.test("  abc"))
    </script>