在[ref] pp.129 - 133 介紹了 AS3的 RegExp class, 很簡明.
var re: RegExp = /\sAct/ig;
表示以空白(\s)開始 接著act的string pattern,
/ig 代表case insensitive and global search
var s: string="林新德-Flash CS3 ActionScript 3.0";
re.exec(s) 搜尋字串s中符合re的子字串
[ref] 林新德-Flash CS3 ActionScript 3.0應用程式設計, 博碩文化
沒有留言:
張貼留言