This question has been answered
Question

Hello everyone, can someone who's really good at computer science please look at these questions and help me? If you choose to help me please make sure the answers are correct as i'm getting graded for this and i'm very confused about this topic.

I thank whoever chooses to help me in advance and I appreciate it very much.

There are multiple screen shots for each question as I wanted to make sure the text is readable


Question 1:

1a.png

1b.png

1c.png

1d.png


Question 2:

2a.png

2b.png


Question 3

3a.png

3b.png


Question 4:

4a.png

4b.png

4c.png

Image transcriptions

Question 1 1 pts When we copy and paste an automatically generated transcript for a video it might look something like what you see below. To edit this into a simple text transcript we need to strip out the timing data and the notes about the confidence of the automatic transcription. Which of the following regular expressions would match the highlighted text. [09af]{8)(-[09af][4)){3]-[09af}{12} [0-9a-f]-[0-9a-f]-[0-9a-f]-[0-9a-f]-[0- 9a-f] [0-9](8)(-[0-9](4))(3)-[0-91{12) [0-9a-f](8)-[0-9a-f][4)(3)-[0-9a-z]{12] [0-9a-f](8)-([0-9a-fl)(4)(3)-[0-9a-z] [0-9a-f](8)(-[0-9a-f](4))(3]-[0-9a-f] {12} {12} WEBVTT regex101 NOTE duration: "02:09:1 REGULAR EXPRESSION v1 v 5. 8840000" 336 matches (~1ms) NOTE Language : en-us [0-91 /gm NOTE Confidence: 0. 8810 TEST STRING 69481372833 WEBVTT

d8d8fcb9-ccb1-41f2-a75e -0c3088e95dc2 NOTE duration: "02: 09: 15 . 8840080" 00:00:01 . 720 --> 00:00: NOTE language : en-us 07 . 798 So we're going NOTE Confidence: 0. 881069481372833 to try to NOTE Confidence: 0. 8810 dod8fcbg-ccb1-41f2-a75e- Oc308 8e95dc2 69481372833 00:00 : 01 . 720 --> 00: 00: 07 .798 a8f8cc83-48c4-4acc-881b So we're going -85b37c73b42c to try to 00 :00:07 . 798 --> 00:00: NOTE Confidence: 0. 881069481372833 13.876 to use Microsoft a8facc83-48c4-4acc-881b- Teams next week, 85637c73b42c NOTE Confidence: 0. 8810 80 : 00 : 07 . 798 --> 00: 00:13. 876 to use Microsoft 69481372833 Teams next week, d2738b5d-b7ee-4658-8388 -467524c3c563 NOTE Confidence: 0. 881069481372833 00: 00: 13 . 876 --> 00:00: d2738b5d-b7ee-4b58-8388- 19.954 467524 c3 c563 so will post Q0: 00: 13 . 876 --> 00:00:19.954 it as a so will post NOTE Confidence: 0. 8022 68326282501

Question 2 1 pts For the code above, what regular expression do we need for the String.replace() change from she/he is to they are? re1 = /YOUR REGEX HERE/gmi ; var new1 = str . replace(re1, ' <mark>they are</mark> HTML JS Result EDIT ON CODEPEN function go( ) { GO var str = I'm not sure what she meant. document . getElementById ( ' text ' ) . inne I think her answer was right. // change she/he is to they Has she checked? They didn't say whether their data was the first or the second are Right, we should ask them about that. Was there a notice on re1 = /YOUR REGEX HERE/gmi; Piazza? var new1 = str. replace(rel, ' Does the professor know? Has anyone told him? <mark>they are</mark> ') I'm sure he does. And that his records have been updated. // change she/he does to they do re2 = /YOUR REGEX HERE/gmi; var new2 = new1. replace(re2, ' <mark>they do</mark> ') //change she/he has to they have re3 = /YOUR REGEX HERE/gmi; var new3 = new2. replace(re3,' <mark>they have</mark> ") // change plain she/he to them re4 = /YOUR REGEX HERE/gmi; var new4 = new3. replace (re4, ' <mark>they</mark> ' )

// change her/his to their re5 = /YOUR REGEX HERE/gmi; var new5 = new4. replace (re4, ' <mark>their</mark> ") // change him/her to them re6 = /YOUR REGEX HERE/gmi; var new6 = new5. replace (re6, ' <mark>them</mark> ') Resources 1x 0.5X 0.25X Rerun O \bs?he is\b ^(helshe) is$( O \b [she] [he] [is]\b O \bs *he is\b

Question 3 1 pts For the code below, what regular expression do we need for the string.replace() change from she/he does to they do? re2 = /YOUR REGEX HERE\b/gmi ; var new2 = new1 . replace(re2, ' <mark>they do</mark> HTML JS Result EDIT ON CODEPEN function go() { GO var str = I'm not sure what she meant. document . getElementById ( ' text ' ) . inne I think her answer was right. // change she/he is to they Has she checked? They didn't say whether their data was the first or the second. are Right, we should ask them about that. Was there a notice on re1 = /YOUR REGEX HERE/gmi; Piazza var new1 = str . replace(rel, ' Does the professor know? Has anyone told him? <mark>they are</mark> ') I'm sure he does. And that his records have been updated. // change she/he does to they do re2 = /YOUR REGEX HERE/gmi; var new2 = new1. replace(re2, ' <mark>they do</mark> ') //change she/he has to they have re3 = /YOUR REGEX HERE/gmi; var new3 = new2 . replace(re3, ' <mark>they have</mark> ') // change plain she/he to them re4 = /YOUR REGEX HERE/gmi; var new4 = new3. replace(re4, '

<mark>they</mark> ") // change her/his to their re5 = /YOUR REGEX HERE/gmi; var new5 = new4. replace (re4,' <mark>their</mark> ") // change him/her to them re6 = /YOUR REGEX HERE/gmi; var new6 = new5. replace(re6, ' <mark>them</mark> ") document . getElementById ( ' text ' ) . inne = new6 Resources 1x 0.5x 0.25X Rerun o \bs?he does\b O s?he does O s?he does\b O \bshe does he does\b

Question 4 1 pts The code below uses a regular expression to test for a valid email address. The code currently uses re = /\bat\@b+.com\b/ but this is not general enough. Using the (artificial) criteria listed below, change this regular expression so that it correctly matches the email addresses it should match and correctly rejects those it should not match. The program will test your RE against the test data when you press SUBMIT marking which strings don't match with an X. HTML CSS J5 Result EDIT ON CODEPEN LIVE <h3>Q7520 Email Address Q7520 Email Address Validation Validation</h3> <p>Modify the regex in this Modify the regex in this codepen so that the validator recognizes codepen so that the validator valid email addresses. Assume the rules for email addresses include the following: recognizes valid email addresses. Assume the rules for email Must start with a letter or a number Can contain letters, numbers, hyphens, underscores, and addresses include the following: periods </p> The part before the @ cannot end with a period <ul> The part after the @ has to start with a letter or a <li>Must start with a number. The part after the @ must end with a dot followed by letter or a number</li> edu, com, org or ng <li>Can contain letters, numbers, hyphens, underscores, and periods</li> <li>The part before the @ TEST cannot end with a period</li> <li>The part after the @ Should Match Should Not Match has to start with a letter or a v abcdef.org [email protected] number. </li> X X abcdef <li>The part after the @ [email protected] @ghi_jki.mno.com must end with a dot followed by X [email protected] eh X edu, com, org or ng</li> Vav [email protected] [email protected] efg.edu X [email protected] X [email protected] rally </ul> X ([email protected]) <br /> abotdefoghi-jkil <!--Email Address <input abodef..ghi.org id-"emailaddress"></input> <button type="button" onclick="validate()">Submit</butt ons - ><span id="feedback"></span> chr> ch3>TEST</h3> <table class="outputtable"> <tr>

LIVE <tr> Q7520 Email Address Validation <td class="tableheader">Should Modify the regex in this codepen so that the validator recognizes Match</td> valid email addresses. Assume the rules for email addresses include the following: <td class="tableheader">Should Not Must start with a letter or a number Match</td> Can contain letters, numbers, hyphens, underscores, and periods </tr> . The part before the @ cannot end with a period <tr> The part after the @ has to start with a letter or a <td class="tabledata"> number. <ul id="yes"> The part after the @ must end with a dot followed by <li>abcodef.org</li> edu, com, org or ng <li>abc. defeghi . jkl.mo.com</li> TEST <li>05_230bcd. efg. edu</li> <li>a-v-1230bu.org</li> Should Match hould Not Match <li>abc+defeghi .ng</li> </ul> [email protected] def.org v [email protected] X X abo def </td abo.deffghi.jkl mno.com @ghi_jkl.mno.com <td class="tabledata"> X [email protected] efg edu <ul id="no"> a v [email protected] bu.org [email protected] efg.edu <li>[email protected] org=/li> X [email protected] X [email protected] rally X ([email protected] uva.edu) <li>abc-def X eghi . jkl.mo. com</li> botdef ghi_jkl <li>_230bcd. efg. edu</li> abodef..ghi.org <li>- foobarerally . com</li> <li>abc+defeghi. jkl</li> <lizabcdef. [email protected]</li> </ul> </td> </tr> /table> Resources 0.5X 0.25x Rerun

Answered by Expert Tutors
Step-by-step explanation
The student who asked this found it Helpful
Overall rating 100%
Question 1 1 pts When we copy and paste an automatically generated transcript for a video it might look something like what you see below. To edit...
Get unstuck

204,222 students got unstuck by Course
Hero in the last week

step by step solutions

Our Expert Tutors provide step by step solutions to help you excel in your courses