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
Post a Comment