I have text like:
content = \"Do you like to code? How I love to code! I\'m always coding.\"
I\'m trying to split it on either a ?>
The most robust way to do this is with a Natural Language Processing library: Rails gem to break a paragraph into series of sentences
You can also split in groups:
@content.split(/(\?+)|(\.+)|(!+)/)
After splitting into groups, you can join the sentence and delimiter.
@content.split(/(\?+)|(\.+)|(!+)/).each_slice(2) {|slice| puts slice.join}