Scala : How to split words using multiple delimeters -


suppose have text file this:

apple#mango&banana@grapes 

the data needs split on multiple delimiters before performing word count.

how that?

use split method:

scala> "apple#mango&banana@grapes".split("[#&@]") res0: array[string] = array(apple, mango, banana, grapes) 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

php - Cannot override Laravel Spark authentication with own implementation -

What is happening when Matlab is starting a "parallel pool"? -