Some writers like to super-emphasize certain points by using multiple exclamation points instead of one. For example, "This cheese is really great!!! I like exclamation points!!!!!!!!" Other times, writers express surprise by mixing exclamation points and question marks. For example, "You really like THIS cheese!?!?!?!!!?".
You are editing a document for publication, and you'd like to get rid of some of the extra punctuation. Wherever you see a group of multiple consecutive exclamation points, replace it with a single exclamation point. Wherever you see a group of multiple consecutive punctuation characters containing at least one question mark and zero or more exclamation points (and no other characters), replace that group with a single question mark. See the examples for further clarification. Return the string after these changes have been made. |