opened
oscargus
username_0
<!--- Make sure to read the Contributing Guidelines:                   --->
<!--- https://github.com/spyder-ide/spyder/blob/master/CONTRIBUTING.md --->
<!--- and follow PEP 8, PEP 257 and Spyder's code style:               --->
<!--- https://github.com/spyder-ide/spyder/wiki/Dev:-Coding-Style      --->

## Description of Changes


* [x] Wrote at least one-line docstrings (for any new functions)
* [x] Added unit test(s) covering the changes (if testable)
* [x] Included a screenshot or animation (if affecting the UI, see [Licecap](https://www.cockos.com/licecap/))


<!--- Explain what you've done and why --->

Earlier, the number of hits and hit number was not correctly computed when "Whole words" were selected, see #7960. This fixes that problem.

![wordcount](https://user-images.githubusercontent.com/8114497/60382883-c2165d80-9a69-11e9-95b5-bf4291eb3f50.gif)

Corrected highlighting based on switches. Earlier, the word switch did not effect the highlighting:
![highlight](https://user-images.githubusercontent.com/8114497/60383645-d9f2df00-9a73-11e9-8087-4a5180c99de8.gif)

Made sure that regex replace considers the case button, see #9713 
![honouringcaseinregexreplace](https://user-images.githubusercontent.com/8114497/60383843-dad94000-9a76-11e9-83fa-fc08f542f779.gif)

I also changed the code to consistenly use `word` for the status of the word check button. Earlier it was mixed `word` and `words`.

Also, I added re.MULTILINE to all regexes that I changed which at least should not decrease the possibility that multiline regexes works at some stage...

### Issue(s) Resolved

<!--- List the issue(s) below, in the form "Fixes #1234"; one per line --->

Fixes #7960
Fixed #9713

### Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the [Developer Certificate of Origin](https://developercertificate.org)
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

<!--- TYPE YOUR USER/NAME AFTER THE FOLLOWING: --->
I certify the above statement is true and correct: Oscar Gustafsson/username_0

<!--- Thanks for your help making Spyder better for everyone! --->
PR: Find/replace bug fixes (hit count with words, case in regex replace, highlight hits)
issue
created
pep8speaks
username_1
comment
created
ccordoba12
username_2
Please merge with master to fix the merge conflict. Thanks!
comment