NotionCommotion Posted April 20, 2017 Share Posted April 20, 2017 Is there a better way to do this? <?php $string='someStringWithoutWhitespace.captureThisStringAfterFirstPeriodAndBeforeWhitespaceOrEqualsign bla bla bla.bla bla'; preg_match('/\.([^\s=]+)/', $string, $matches); echo($matches[1]); Link to comment Share on other sites More sharing options...
dkub Posted April 20, 2017 Share Posted April 20, 2017 Looks about as succinct as you're going to get. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.