import java.util.*
fun main(args: Array<String>) {
val text = "red 1 green 3 blue"
println(text.split(Regex("red|green|blue")))
println( text.split(Regex("red|green|blue")).filter{ !it.isBlank() } )
}
aW1wb3J0IGphdmEudXRpbC4qCiAKZnVuIG1haW4oYXJnczogQXJyYXk8U3RyaW5nPikgewogICAgdmFsIHRleHQgPSAicmVkIDEgZ3JlZW4gMyBibHVlIgoJcHJpbnRsbih0ZXh0LnNwbGl0KFJlZ2V4KCJyZWR8Z3JlZW58Ymx1ZSIpKSkKCXByaW50bG4oIHRleHQuc3BsaXQoUmVnZXgoInJlZHxncmVlbnxibHVlIikpLmZpbHRlcnsgIWl0LmlzQmxhbmsoKSB9ICkKICAgIAp9