git
bitbucket.org
,
gitlab.com
, or
github.com
,
git push
your local repo to the above remote repo.
node
assignments the line
node_modules/
must
be in your .gitignore
file.
<nmla@iba.dk>
with:
submission <subjectname>
'
in the subject line
Write a regular expression that extracts the domain name portion of a Web URL (excluding the “ www. ” subdomain if supplied). The protocol portion of the URL should be optional. For example, the expression should extract the domain name “ example.com ” from any of the following URLs:
http://www.example.com/
http://www.example.com/hello/there.html
http://example.com/hello/there.html
www.example.com/hello/there.html
https://www.example.com
Enhance the script displayed earlier at Example 31.13 to display not just the URL of each link, but also the link text (the text between the < a > and < /a > tags).
Make an HTML5/JavaScript page documenting whether the special characters 'æ', 'ø', and 'å', and perhaps others, are part of the Regular Expression concept of word characters.
Include the file
http://dkexit.eu/downloads/17192_8.js
in a web page. It is a JS file holding a string
constant named text2
. The constant is
an annotated poem by Poe, re the C-comments of the
file.
Make a wordlist in an array by means of a match
.
How many words are in the text? Make the page print the number.
By traversing the word array make a new array that has all the different words from the first array, and a count for each of those words. Print the array on the page.
Finally the page must display a character count, What is the frequency of each letter in the alphabet. Create an object with the result as in
'use strict';
let obj = {
a: 2.56,
b: 0.24,
,,,
z: 0.86
};
and place the results on the page.
This assignment is the same as Section 31.4.4 but with
http://dkexit.eu/downloads/8fdmf10.js
as input.
It is a JS file holding a string
constant named text1
. The constant is a Danish
text from the late 19th century.