treat glyphs with alpha=0 differently than normal glyphs (remove outlines)
[swftools.git] / lib / as3 / ok / regexp.as
1
2 package {
3     import flash.display.MovieClip
4
5     public class Main extends flash.display.MovieClip {
6         public function Main() {
7             /* test matching */
8             var r:RegExp = /ok \d\/\d/;
9             trace("ok 1/7".match(r));
10
11             /* test searching */
12             var s:String = "error OK 9/7 ok 2/7"
13             trace(s.substring(s.search(r)));
14             
15             /* test /.../i syntax */
16             var r2:RegExp = /ok \d\/\d/i;
17             var s2:String = "error OK 3/7"
18             var s3:String = "error ok 3/7"
19             trace(s3.substring(s2.search(r2)));
20
21             /* test \n,\r,\t */
22             if(" .\n\r\t".search(/[\n][\r][\t]/) == 2) trace("ok 4/7");
23
24             /* test * at end of regexp */
25             if("  xxx  ".search(/xx*/) == 2) trace("ok 5/7");
26             
27             /* test quotes */
28             if(" \" ".search(/"/) == 1) trace("ok 6/7");
29             if(' \' '.search(/'/) == 1) trace("ok 7/7");
30             
31             trace("[exit]");
32         }
33     }
34 }
35