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
.
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
.
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:
matched string, or array of strings.
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.