PHP exploding a string while keeping delimiters
问题 For my project I needed to analyze different sentences and work out which ones were questions by determining if they ended in question marks or not. So I tried using explode but it didn't support multiple delimiters. I temporarily replaced all punctuation to be chr(1) so that I could explode all sentences no matter what they ended with (., !, ?, etc...). Then I needed to find the last letter of each sentence however the explode function had removed all of the punctuation, so I needed some way