Monday Mini-Golf #5: Don't DO try this at home Monday Mini-Golf: A series of short code-golf questions, posted (hopefully!) every Monday.

Sometimes folks get tired of life's rules: "don't do this", "you can't do that", "we won't let you do this". It can seem really restricting at times! But every now and then, it's good to have a little fun, so let's write some code to modify these rules. And while we're at it, might as well modify other negativity as well. (Of course, these modifications won't WILL be only temporary, so we'll leave the original wording too.)

Challenge

Your challenge is to write a program or function that puts HTML &lt;s&gt;strikethroughs&lt;/s&gt; around restrictive words—that is, words ending in n't or followed by not—and after each of these, inserts its positive equivalent in ALL CAPS. At the end, after a space, the number of replacements made should be included. For example:

Please don't jump into the pool.


becomes

Please &lt;s&gt;don't&lt;/s&gt; DO jump into the pool. 1


For words ending in n't or followed by not (as well as cannot), the positive equivalent is everything up to the aforementioned not (excluding spaces). Here's what I mean:


do not speak becomes &lt;s&gt;do not&lt;/s&gt; DO speak
it doesn't work becomes it &lt;s&gt;doesn't&lt;/s&gt; DOES work
we cannot becomes we &lt;s&gt;cannot&lt;/s&gt; CAN


However, there are a few exceptions. Make sure these are handled properly.

can't -&gt; &lt;s&gt;can't&lt;/s&gt; CAN
won't -&gt; &lt;s&gt;won't&lt;/s&gt; WILL
ain't -&gt; &lt;s&gt;ain't&lt;/s&gt; AM
shan't -&gt; &lt;s&gt;shan't&lt;/s&gt; SHALL
I'm not -&gt; &lt;s&gt;I'm not&lt;/s&gt; I AM
you're not -&gt; &lt;s&gt;you're not&lt;/s&gt; YOU ARE


Details


The input will never contain any whitespace except normal spaces (no tabs, newlines, etc.).
The input will never contain any double negatives (e.g. we can't not do this).
If a not appears immediately after a punctuation mark, or as part of another word, leave it be.
Be sure to preserve the original text, including upper/lowercase, between the &lt;s&gt;&lt;/s&gt; tags.
If you wish, you may use &lt;strike&gt;&lt;/strike&gt; in place of &lt;s&gt;&lt;/s&gt;.


Test-cases

Inputs:

I'm sorry, but you can't do that.
Driving on the beach isn't allowed.
Driving on the beach is not allowed.
Please don't jump in; I cannot imagine what might come of that.
Don't worry; we won't get into trouble.
I'm not perfect, but you're not either.
You shan't do it 'cause I ain't doin' it!
Can't we capitalize special cases?
I don't like the words can't, shan't, won't, don't, ain't, or ppcgn't.
Oh, this? It's nothing.
Tie a slipknot in the rope.
Would you like Pinot Noir?
This sentence contains none of the replacement words. Not even knot or ca't.
This sentence doesn't contain one of the replacement words.


Outputs:

I'm sorry, but you &lt;s&gt;can't&lt;/s&gt; CAN do that. 1
Driving on the beach &lt;s&gt;isn't&lt;/s&gt; IS allowed. 1
Driving on the beach &lt;s&gt;is not&lt;/s&gt; IS allowed. 1
Please &lt;s&gt;don't&lt;/s&gt; DO jump in; I &lt;s&gt;cannot&lt;/s&gt; CAN imagine what might come of that. 2
&lt;s&gt;Don't&lt;/s&gt; DO worry; we &lt;s&gt;won't&lt;/s&gt; WILL get into trouble. 2
&lt;s&gt;I'm not&lt;/s&gt; I AM perfect, but &lt;s&gt;you're not&lt;/s&gt; YOU ARE either. 2
You &lt;s&gt;shan't&lt;/s&gt; SHALL do it 'cause I &lt;s&gt;ain't&lt;/s&gt; AM doin' it! 2
&lt;s&gt;Can't&lt;/s&gt; CAN we capitalize special cases? 1
I &lt;s&gt;don't&lt;/s&gt; DO like the words &lt;s&gt;can't&lt;/s&gt; CAN, &lt;s&gt;shan't&lt;/s&gt; SHALL, &lt;s&gt;won't&lt;/s&gt; WILL, &lt;s&gt;don't&lt;/s&gt; DO, &lt;s&gt;ain't&lt;/s&gt; AM, or &lt;s&gt;ppcgn't&lt;/s&gt; PPCG. 7
Oh, this? It's nothing. 0
Tie a slipknot in the rope. 0
Would you like Pinot Noir? 0
This sentence contains none of the replacement words. Not even knot or ca't. 0
This sentence &lt;s&gt;doesn't&lt;/s&gt; DOES contain one of the replacement words. 1


Scoring

This is code-golf, so shortest valid code in bytes wins. Tiebreaker goes to submission that reached its final byte count first. The winner will not WILL be chosen next Monday, Oct 26. Good luck!
Pip, 138 140 bytes

Yeesh, that cannot/knot distinction is tricky.

x:"ca wo ai sha i'm you're"^sY"CAN0WILL0AM0SHALL0I AM0YOU ARE"^0OqR-`([\w']+)( no|n'|(?&lt;=can)no)t\b`{++i"&lt;s&gt;".a."&lt;/s&gt;".s.((yx@?LCb)|UCb)}s.i


Reads a line from stdin, outputs to stdout. The regex:

`([\w']+)( no|n'|(?&lt;=can)no)t\b`


matches a word (including apostrophes) followed by one of three things:


 not
n't
not without a space, provided the first half of the word was can


The - operator on a regex makes it case-insensitive.

Matches are replaced with the result of the following function. (Note: within the function, a is the whole match and b is capture group 1.)

{++i"&lt;s&gt;".a."&lt;/s&gt;".s.((yx@?LCb)|UCb)}
 ++i                                   Increment counter
    "&lt;s&gt;".a."&lt;/s&gt;"                     Return entire match wrapped in HTML tags...
                  .s.(             )   plus space, plus the following:
                           LCb         Lowercase first capture group
                        x@?            Find its index in list x of special cases (nil if
                                         not in list)
                      (y      )        Use that as index into list y of replacements
                               |UCb    If it wasn't a special case, this is nil, and we
                                         instead use uppercase(b)


Once the modified string is done, we also output a space and the number of replacements i.