how to convert ECMA-262(ActionScript3.0) RegularExpression to ICU(Objective-C) RegularExpression?
Now, I something doing about parse work.
I want to use actionscript3.0 RegularExpression开发者_JAVA技巧 source code to Objective-C program.
var reg:RegExp = new RegExp("^[0-9]+$", "gm");
how to convert NSRegularExpression?
p.s: ActionScript 3.0 implements regular expressions as defined in the ECMAScript edition 3 language specification.
thk.
Check how you use regexes in objective-c, reuse the pattern ^[0-9]+$
(btw. you can rewrite it to ^\d+$
). You need also to activate the modifiers g
(global match ==> matches all occurences) and m
(multiline, makes the $
matches on line ends instead of string end).
精彩评论