Working With Strings

Reading and Resources

Homework 10

  • Use github classroom to accept the assignment
  • Don’t forget to commit and push your changes!
    • You don’t have to wait until the assignment is complete to push!
    • Push early and often!

Hints and Clarifications

  • Regular expressions are not necessary all the time

  • stringr functions are handy

  • str_view() vs str_view_all()

  • Step 3: Any time you see the word “ugh”, with any number of h’s, followed by a punctuation mark, delete this.

    • ugh, ugh! ughh! ughhhh should be deleted but ughhhhh should not
  • Step 4: Replace all instances of exactly 2 a’s with exactly 2 e’s.

    • “baa” –> “bee” but nothing should happen to “baaa”
  • Step 6 Every word that ends in b, change that to a y. Hint: punctuation!

    • either “b!” or “b” is changed to y, no need to keep punctuation
  • By the end of step 7, you should see individual words that make sense.