package lua.lib.lrexlib
Available on lua
staticcount(subj:String, patt:EitherType<Rex, String>, cf:Int, ef:Int):DynamicThis function counts matches of the pattern patt in the string subj.
staticinlinecreate(expr:String, flag:EitherType<Int, String>):Rexstaticfind(patt:EitherType<Rex, String>, subj:String, ?init:Int, ?ef:Int):DynamicThe function searches for the first match of the regexp patt in the string subj, starting from offset init, subject to flags cf and ef.
staticflags(?tb:Dynamic):Dynamicstaticgmatch(subj:String, patt:EitherType<Rex, String>, ?cf:Int, ?ef:Int):() ‑> StringThe function is intended for use in the generic for Lua construct. It returns an iterator for repeated matching of the pattern patt in the string subj, subject to flags cf and ef.
staticgsub(subj:String, patt:EitherType<Rex, String>, repl:Dynamic, ?n:Int, ?cf:Int, ?ef:Int):StringThis function searches for all matches of the pattern patt in the string subj and replaces them according to the parameters repl and n.
staticmatch(patt:EitherType<Rex, String>, subj:String, ?init:Int, ?ef:Int):DynamicThe function searches for the first match of the regexp patt in the string subj, starting from offset init, subject to flags cf and ef.
Returns:
staticsplit(subj:String, sep:EitherType<Rex, String>, ?cf:Int, ?ef:Int):() ‑> StringThe function is intended for use in the generic for Lua construct. It is used for splitting a subject string subj into parts (sections). The sep parameter is a regular expression pattern representing separators between the sections.
exec(subj:String, ?init:Int, ?ef:Int):DynamicThis function searches for the first match of the regexp in the string subj, starting from offset init, subject to execution flags ef.
tfind(subj:String, ?init:Int, ?ef:Int):DynamicThe function searches for the first match of the regexp in the string subj, starting from offset init, subject to execution flags ef.
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/lua/lib/lrexlib/Rex.html