You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No Deadlock => executeCommand() can handle huge output
val result =BashUtil.executeCommand("echo 'Hello World'") { line ->// handle read line. e.g. print it outprintln(line)
}
// result is the complete output stringprintln(result)
MRegex
findFirst(input: String) find first match for input on regex
findAll(input: String) find all matches for input on regex
val regex =MRegex("http:\\/\\/([a-z0-9-\\.]+):(\\d+)")
val analze = regex.findFirst("http://my.test.com:3128")
if (analze isFindFirstResult.SingleMatch) {
val (hostname:String, port:String) = analze.groups
println("Host: $hostname; Port $port")
}