Rex
package lua.lib.lrexlib
Available on lua
Static methods
staticcount(subj:String, patt:EitherType<Rex, String>, cf:Int, ef:Int):Dynamic
This function counts matches of the pattern patt
in the string subj
.
staticinlinecreate(expr:String, flag:EitherType<Int, String>):Rex
staticfind(patt:EitherType<Rex, String>, subj:String, ?init:Int, ?ef:Int):Dynamic
The 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):Dynamic
staticgmatch(subj:String, patt:EitherType<Rex, String>, ?cf:Int, ?ef:Int):() ‑> String
The 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):String
This 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):Dynamic
The 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):() ‑> String
The 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.
Methods
exec(subj:String, ?init:Int, ?ef:Int):Dynamic
This 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):Dynamic
The 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