Question: Write the code required to insert the word not after each occurrence of is in the following string: This sentence is a test, is it

Write the code required to insert the word \"not\" after each occurrence of \"is\" in the following string: \"This sentence is a test, is it not?\". How many occurrences of \"is\" does the code find?

Modify the code written in so that it only matches occurrences of \"is\" that are surrounded by whitespace.

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 Programming Questions!