I have a string that contains 2 integer numbers separated by whitespace followed by any character string which includes whitespace.
Example:
23 14 this is a random string
How do I extract this is a random string?
The integers aren’t guaranteed to be double digits therefore I can’t figure out how to use indexOf and substring to extract this data.
Thanks in advance.
Wow. I can’t believe how much code some people write to do the simplest of things…
Here’s an elegant, one-line solution:
Here’s a test:
Output: