I have following list of splitters:
val splitd = list(" or ", " and ", " up to ")
and the following string:
val st = "You should eat 2 kg apples a week or 2 bananas everyday; up to a month you should eat 5g of ginger everyday"
I want following output:
val entry = List("You should eat 2 kg apples a week", "2 bananas everyday;", "a month you should eat 5g of ginger everyday")
If there is no entry in "splitd" matching the content in "st" then full string "st" should be returned. Thanks in advance for your help.
Dear @Shadowlands and @marstran, need your help again.