Question: Javascript on regex : Using examples and materials provided, develop a solution to report on all occurrences of 'hits' in a text file. The file

Javascript on regex : Using examples and materials provided, develop a solution to report on all
occurrences of 'hits' in a text file.
The file is an excerpt of "Scandal in Bohemia" (a Sherlock Holmes story).
Requirement:
Your solution will report the line number of the file in which the pattern was
found, as well as at which offsets in the line (and how many times found in the
line).
You'll also keep track of the total number of hits, reporting that at the end.
I do not wish to see the lines, just what was requested in the requirements above.
For the sake of this assignment, you may assume that you will NOT discard blank lines
(counting them) and that no pattern will span lines.
Javascript on regex : Using examples and

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!