[NAME]
ALL.dao.type.string.pattern.extract

[TITLE]
string.extract()

[DESCRIPTION]


     
   1  string.extract( 
   2          pattern :string, 
   3          mtype   :enum<both,matched,unmatched> = $matched,
   4          mask    :tuple<pattern:string,reversed:enum<false,true>> = ('', $false)
   5          ) => list<string>
     

Depending on the value of mtype, string.extract() returns all the subtrings that match 
to pattern if mtype is set to $matched; or all the substrings of the unmatched parts if 
mtype is $unmatched; or all the substrings of both the matched and unmatched parts if 
mtype is $all.

An additional parameter mask can be used to restrict the seaching of pattern within the 
substrings that match to mask.pattern, if mask.reversed is set to $false; otherwise, the
searching will be restricted outside of mask.pattern-matched regions.