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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!