不运用正则排除出现的特定数的数字

import flash.utils.Timer;

import flash.events.TimerEvent;



var time:Timer = new Timer(1);

time.addEventListener(TimerEvent.TIMER,timeHandler);

time.start();

var i:int = 0;

var str:String;

function timeHandler(e:TimerEvent):void

{

	i++;

	str = String(i);

	if (str.indexOf("4") != -1)

	{

		trace(i+"----出现4");

	}

	else

	{

		trace(i);

	}

}

你可能感兴趣的:(正则)