Last active
October 22, 2020 01:22
-
-
Save mcsee/19b5965879d11e6c185d4591add24042 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$schoolDescription = 'College of Springfield'; | |
preg_match('/[^ ]*$/', $schoolDescription, $results); | |
$location = $results[0]; // $location = 'Springfield'. | |
$school = preg_split('/[\s,]+/', $schoolDescription, 3)[0]; //'College' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment