/k[^\m]*s/gi
Demonstrates how regex corpus unit tests work.
Corpus tests allow you to unit test your regular expressions using a typical red/green development flow.
Test sections are marked indicating if the following lines should (#+) or should not (#-) match the regex pattern. Blank lines are ignored.
#+ The following lines will be tested. If they match, they'll be hilighted in green, otherwise they'll be red
mickey mouse.
Mighty Mouse.
#- Nothing below this line should match, if it does it'll show up red
danger mouse
#+ You can switch back to positive matching
Miney mouse
#- And back again.
magic mouse # Oops shouldn't match