match
Creates new String columns according to MatchResult capturing groups, excluding the first group which is the entire matched String. Example:
dataFrameOf("str" to listOf("100 ml", "1 L"))
.split { "str"<String>() }.match("(\d+)\s*(ml|l|L)").into("volume", "unit")Content copied to clipboard
Created columns will be nullable if regex doesn't match some rows or there are nulls in the original column Check Split.by overload with regex parameter if you're looking to split String value by Regex delimiter
For more information: See split on the documentation website.