Question: String matching. Use regular expression to switch cats and dogs in the following string: Cats and dogs are lovely pets. Dogs are not smarter than
String matching. Use regular expression to switch cats and dogs in the following string: Cats and dogs are lovely pets. Dogs are not smarter than cats. Cats are smarter than dogs. Your code should print Dogs and Cats are lovely pets. Cats are not smarter than dogs. Dogs are smarter than cats.. Note the capitalization.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
