To view solutions, open the file /Day7/index.html
in your browser.
Uncomment js connection string:
<script src="js/regexp-I.js"></script>
<!--<script src="js/regexp-II.js"></script>-->
<!--<script src="js/regexp-III.js"></script>-->
to view different solution.
Do not forget to open the Developer panel and see the section Console
.
Task:
Complete the function in the editor below by returning a RegExp object, re
, that matches any string s
that begins
and ends with the same vowel. Recall that the English vowels are a, e, i, o, and u
.
Solution:
In js/regexp-I.js
.
Task:
Complete the function in the editor below by returning a RegExp object, re
, that matches any string s
satisfying
both of the following conditions:
-
String starts with the prefix
Mr., Mrs., Ms., Dr., or Er
. -
The remainder of string
s
(i.e., the rest of the string after the prefix) consists of one or more upper and/or lowercase English alphabetic letters (i.e.,[a-z] and [A-Z]
).
Solution:
In js/regexp-II.js
.
Task:
Complete the function in the editor below by returning a RegExp object, re
, that matches every integer
in some string s
.
Solution:
In js/regexp-III.js
.
Return to navigation list