Just do IT

思うは招く

Ruby 文字列中のアポストロフィも含めて String#scan する

String#scan(/[\w'.]+/)でどうだろうか。

> string = "I'm a good person, and you? You don't look so smart."

> string.scan(/[\w'.]+/)
=> ["I'm", "a", "good", "person", "and", "you", "You", "don't", "look", "so", "smart."]

文末のピリオドを含めないなら。

string.scan(/[\w']+/)
=> ["I'm", "a", "good", "person", "and", "you", "You", "don't", "look", "so", "smart"]