Basic exercises
Enter a regexp that matches words per the instructions. Example of words which should be matched are given below the instructions. The answer is accepted only if all example words are matched, but at the same time words not belonging to the group are not. For example, the asnwer
.*
in the first exercise will not be accepted, because while it does match all 5-character words, it also matches words containing 2 characters or 10 characters.
Exercise 1
Match words containing exactly 5 characters.
Find |
---|
which |
about |
power |
where |
while |
.{5} | ..... |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 2
Match words containing exactly 4 characters with the first two of them being 'lo'.
Find |
---|
look |
long |
love |
logo |
lo.. | lo.{2} |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 3
Match all words containing at least 10 characters.
Find |
---|
production |
organization |
internationally |
internationally |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 4
Match words starting with the negative prefix un-.
Find |
---|
unlike |
uncertainty |
unlimited |
uncomfortable |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 5
Match words starting with one of the following negative prefixes: im-, in-.
Find |
---|
injustice |
imperfect |
inevitable |
incomplete |
impossible |
(im|in).* |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 6
Match words ending with the suffix -less.
Find |
---|
countless |
useless |
homeless |
careless |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 7
Match words consisting of lower-case letters only.
Find |
---|
countless |
look |
where |
hero |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 8
Match acronyms, i.e. words consisting of capital letters only.
Find |
---|
X |
DNA |
NATO |
TV |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 9
Match acronyms containing at least 2 capital characters.
Find |
---|
DNA |
TV |
ID |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 10
Match possessive nouns/pronouns in singular.
Find |
---|
one's |
family's |
everyone's |
sister's |
mother's |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 11
Match years from the 18. century.
Find |
---|
1758 |
1795 |
1701 |
1799 |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 12
Match adjectives in the following format:
Find |
---|
17-year-old |
2-year-old |
26-year-old |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 13
Match numbers followed by a full stop (dot).
Find |
---|
2. |
80. |
19. |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 14
Match one or more questioning marks.
Find |
---|
? |
??? |
WELL DONE!
INCOMPLETE SOLUTION
Regexp on tags
In this part, the goal is to match a specific group of words using the tagset available at this link .
This can be used in the CQL query type in the format [tag="value"] where value is the given regexp you should enter.
Exercise 15
Search for all nouns.
Find |
---|
NN |
NNS |
NNSZ |
NPZ |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 16
Search for all foreign words.
Find |
---|
FW |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 17
Search for possessive nouns.
Find |
---|
NNSZ |
NNZ |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 18
Search for nouns in singular (excluding proper nouns).
Find |
---|
NN |
NNZ |
(NNZ|NN) |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 19
Search for all nouns in singular (including proper nouns).
Find |
---|
NN |
NNZ |
NP |
NPZ |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 20
Search for adverbs in comparative and superlative forms.
Find |
---|
RBR |
RBS |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 21
Search for adverbs and adjectives in comparative and superlative forms.
Find |
---|
RBR |
RBS |
JJR |
JJS |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 22
Find all verbs in the past tense.
Find |
---|
VBD |
VHD |
VVD |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 23
Find the verb be in any form.
Find |
---|
VB |
VBZ |
VBG |
WELL DONE!
INCOMPLETE SOLUTION
Exercise 24
All words except for nouns (i.e. tags which do not start with N).
Find |
---|
VB |
Z |
WRB |
CD |
WELL DONE!
INCOMPLETE SOLUTION