I have a few strings for which I want to tokenize
for example:
123ae4rf468 to be split into [123,ae4rf,468]
878768stb4hgbjh354 to be split into [878768,stb4hgbjh,354]
I tried below but did not work. Kindly, help
def groupStrings(): Unit ={
val pattern: Regex = "\"[^A-Z0-9]+|(?<=[A-Z])(?=[0-9])|(?<=[0-9])(?=[A-Z])\"".r
for(patternMatch <- pattern.findAllMatchIn("12341abc1234"))
println(patternMatch.groupCount)
}