Skip to content

Instantly share code, notes, and snippets.

@martinbonnin
Created September 14, 2019 23:03
Show Gist options
  • Save martinbonnin/c2e4652d71618d119474529a70fb4c85 to your computer and use it in GitHub Desktop.
Save martinbonnin/c2e4652d71618d119474529a70fb4c85 to your computer and use it in GitHub Desktop.
val matchResult = Regex("(?<key>.*)=(?<value>.*)").matchEntire("jdk=8")
if (matchResult != null) {
println("key=${matchResult.groups.get("key")!!.value}")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment