Question: Create 2 files, named a3q1.html and a3q1.js, to implement a simple regular expression testing page, like the one shown below. Try to match the layout

 Create 2 files, named a3q1.html and a3q1.js, to implement a simple

Create 2 files, named a3q1.html and a3q1.js, to implement a simple regular expression testing

page, like the one shown below. Try to match the layout in the screenshot. There is no need to

put any CSS code to achieve this layout. The text area should have 10 rows and 80 columns, and

the first 2 input text should have a size of 20 and the last one a size of 5. The title should be an

h1.

All the JavaScript code should be put in the js file, except for connecting the search button with

a search function located in the js file, which has to be included in the head element of the html

file.

Your search function should:

1. start by splitting the text from the text area according to the split characters given in the

first input text box. If the first input text box is empty, then dont split the text

2. create a regular expression by providing the RegExp constructor function the text of the

second and third input boxes (use new RegExp(), not /.../...)

3. test the regular expression on each nonempty word (or element) of the array obtained

from step 1, or on the text directly if no splitting characters were given

4. Output the number of nonempty words in the text, plus the number of words matching

the regular expression.

uestion #1 Create 2 files, named a3q1.html and a3q1.js, to implement a simple regular expression testing page, like the one shown below. Try to match the layout in the screenshot. There is no need to put any CSS code to achieve this layout. The text area should have 10 rows and 80 columns, and the first 2 input text should have a size of 20 and the last one a size of 5. The title should be an h1. Assignment 3 Question 1 Search n this text John ; Doe ; ] d2019"ple. con JaneiDei janeeg0ogle. con Bobi777 bob 777bob.con Splr the text accouding to these chaaces Test each word with this regex: Modifiers for the regex: Search Rese There is a total of 8 non-empty words in the text, including 3 words matching the regex. Computer Science & Software Engineering Concordia University SOEN 287: Web Programming 1 Winter 2019 Assignment 3 All the JavaScript code should be put in the js file, except for connecting the search button with a search function located in the js file, which has to be included in the head element of the html file. Your search function should 1. start by splitting the text from the text area according to the split characters given in the first input text box. If the first input text box is empty, then don't split the text create a regular expression by providing the RegExp constructor function the text of the second and third input boxes (use new RegExp(), not /......) test the regular expression on each non-empty word (or element) of the array obtained from step 1, or on the text directly if no splitting characters were given Output the number of non-empty words in the text, plus the number of words matching the regular expression. 2. 3. 4

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 Databases Questions!