This is really a great example of an explanation. You’ll probably have some edge cases like 3 names or more so you’ll need to explore regular expressions I think. Have a look at regex101.com and their library of common regular expressions.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Split on spaces | 5 | 74 | January 22, 2026 | |
| Find number of spaces in a string | 5 | 202 | July 18, 2024 | |
| Get a name from split | 5 | 681 | April 20, 2024 | |
| Split() by a space | 3 | 298 | February 23, 2025 | |
| Split First and Last Name | 1 | 965 | May 3, 2024 |