package { import com.actionscriptbible.Example; public class FlashTest extends Example { public function FlashTest() { // http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/ var r:RegExp = /^1?$|^(11+?)\1+$/; var u:String = "", s:String = ""; for (var i:int = 1; i < 14; i++) { u += "1"; s += i + " is " + (r.test (u) ? "not " : "") + "prime\n"; } trace(s); } } }