How to split text

Thank you sir for the demo, but in I don’t know the number(it can be 3 or 5 or…)