Counting Sentences and Paragraphs : Word counter « File Directory « Ruby






Counting Sentences and Paragraphs

puts "Test code! It works. Does it? Yes.".split(/\.|\?|!/).length

 

Related examples in the same category

1.File word counter
2.paragraph count
3.sentence count