match

fun match(    regex: Regex,     string: String,     isGlobal: Boolean): MutableList<String>

Get all the matches for string compiled by pattern. If isGlobal is true, the return results will only include the group 0 matches. It is similar to string.match(regexp) in JavaScript.

Return

all matches

Parameters

regex

the regexp

string

the string

isGlobal

similar to JavaScript /g flag