These exercises accompany the slides on Moodle. Try following the slides and completing the questions when prompted. There are some links at the bottom of the page.

Please note that if you're unforunate enough to use Internet Explorer, this page will not work. Please use another browser.

Question 1.

Find all a's in the sentence.

The cat sat on the mat.

Answer: //g

Question 2.

Find all occurrences of hat, hit, hot and hut.

Jimmy's hat couldn't protect him from the heat of the hot sun, so he hit the hut.

Answer: //g

Question 3.

Find all occurrences of hat, hit, hot and hut.

Jimmy's hat couldn't protect him from the heat of the hot sun, so he hit the hut. The rhythm in the hut wasn't enough to withstand the heat.

Answer: //g

Question 4.

Find all letters in the sentence.

The cat sat on the mat.

Answer: //g

Question 5.

Find all non-letters in the sentence.

The cat sat on the mat.

Answer: //g

Question 6.

Find all 4-letter words starting with h and ending in t

Jimmy's hat couldn't protect him from the heat of the hot sun, so he hit the hut. The rhythm in the hut wasn't enough to withstand the heat.

Answer: //g

Question 7.

Find all words containing pick.

Peter Piper picked a peck of pickled peppers.
Did Peter Piper pick a peck of pickled peppers?
If Peter Piper picked a peck of pickled peppers,
where's the peck of pickled peppers Peter Piper picked?

Answer: //g

Question 8.

Peter's 'c' key is broken, can you still find all words containing pick, or at least those words that should do.

Peter Piper piked a pek of pickled peppers.
Did Peter Piper pick a pek of pikled peppers?
If Peter Piper piked a peck of pickled peppers,
where's the pek of pikled peppers Peter Piper picked?

Answer: //g

Question 9.

Find every word in this tongue-twister. Note, this is basic tokenisation, you'll be doing a lot more of this later.

You've no need to light a night-light
On a light night like tonight,
For a night-light's light's a slight light,
And tonight's a night that's light.
When a night's light, like tonight's light,
It is really not quite right
To light night-lights with their slight lights
On a light night like tonight.

Answer: //g

Question 10.

Find all telephone numbers in the list.

Answer: //g

Question 11.

Find all postcodes in the list.

Answer: //g

Question 12.

Find all days of the week.

I don't care if Monday's blue
Tuesday's gray and Wednesday too
Thursday I don't care about you
It's Friday I'm in love
Monday you can fall apart
Tuesday Wednesday break my heart
Thursday doesn't even start
It's Friday I'm in love

Saturday wait
And Sunday always comes too late
But Friday never hesitate

I don't care if Monday's black
Tuesday Wednesday heart attack
Thursday never looking back
It's Friday I'm in love

... (Friday I'm in Love, The Cure)

Answer: //g

Question 13.

Find all prices in the menu.

specialties
P A S T A
TOMATO BASIL PASTA $13.95
Grilled Chicken, Fresh Mozzarella, a Touch of Garlic and Penne Pasta. Light and Fresh
(Full-size portion only)
FETTUCCINI ALFREDO $14.95 PASTA CARBONARA $14.95
A Rich Parmesan Cream Sauce Spaghettini with Smoked Bacon, Green Peas
with Chicken $17.95 and a Garlic-Parmesan Cream Sauce
with Chicken $17.95
FOUR CHEESE PASTA $13.95 EVELYN'S FAVORITE PASTA $14.95
Penne Pasta, Mozzarella, Ricotta, Romano and Penne Tossed with Broccoli, Oven-Dried Tomato,
Parmesan Cheeses, Marinara Sauce and Fresh Basil Roasted Eggplant, Peppers, Artichoke, Kalamata
with Chicken $16.95 Olives, Garlic and Pine Nuts
PASTA WITH MEAT SAUCE $14.50
A Rich Meat Sauce Slowly Simmered with Tomatoes, Garlic and Herbs
LOUISIANA CHICKEN PASTA $16.95
Parmesan Crusted Chicken Served Over Pasta with Mushrooms,
PASTA DA VINCI $16.95
Sauteed Chicken, Mushrooms and Onions in a Delicious Madeira Wine Sauce
Tossed with Penne Pasta
FETTUCCINI WITH CHICKEN AND SUN-DRIED TOMATOES $15.95
In a Sun-Dried Tomato Sauce with Garlic, Cream and Parmesan Cheese
FARFALLE WITH CHICKEN AND ROASTED GARLIC $16.95
Bow-Tie Pasta, Chicken, Mushrooms, Tomato, Pancetta, Peas
and Caramelized Onions in a Roasted Garlic-Parmesan Cream Sauce
GARLIC NOODLES $13.95
Spaghettini, Fresh Asparagus, Shiitake Mushrooms, Oven-Roasted Tomatoes
and Parmesan in a Delicious Garlic Sauce
with Chicken $16.95 with Shrimp $17.95
SPICY CHICKEN CHIPOTLE PASTA $16.50
Penne Pasta, Honey Glazed Chicken, Asparagus, Red and Yellow Peppers, Peas,
Garlic and Onion in a Spicy Chipotle Parmesan Cream Sauce
SHRIMP WITH ANGEL HAIR $16.95 BISTRO SHRIMP PASTA $17.95
Large Shrimp Sauteed with Lemon, Garlic, Herbs, Crispy Battered Shrimp, Fresh Mushrooms,
Fresh Basil and Tomato on Top of Angel Hair Pasta Tomato and Arugula Tossed with Spaghettini
with a Touch of Marinara Sauce and a Basil-Garlic-Lemon Cream Sauce
CAJUN JAMBALAYA PASTA $20
Our most popular pasta dish!
Shrimp and Chicken Sauteed with Tomato, Onions and Peppers
in a Very Spicy Cajun Sauce. All on Top of Fresh Linguini
(Full-size portion only)
Lunch-Sized Portions are Available until 5:00 P.M. $10 to $15

Answer: //g

Question 14.

Find all occurrences of the word he.

On a balmy Midsummer's Eve he found her in the heather.

Answer: //g

Question 15.

Find all occurrences of was not followed by going.

I was going swimming. I was swimming. She was singing songs. I was bringing songs for her to sing.

Answer: //g

Question 16.

Using positive lookahead, find the day when "I'm in love".

I don't care if Monday's blue
Tuesday's gray and Wednesday too
Thursday I don't care about you
It's Friday I'm in love
Monday you can fall apart
Tuesday Wednesday break my heart
Thursday doesn't even start
It's Friday I'm in love

Saturday wait
And Sunday always comes too late
But Friday never hesitate

I don't care if Monday's black
Tuesday Wednesday heart attack
Thursday never looking back
It's Friday I'm in love

... (Friday I'm in Love, The Cure)

Answer: //g

Question 17.

Find all of the Queens not named Elizabeth.

Answer: //g

Question 18.

Detect n (e.g. 5) letter palindromes in this list.

  1. civic
  2. dewed
  3. deified
  4. dad
  5. mum
  6. devoved
  7. hannah
  8. peeweep
  9. repaper
  10. kayak
  11. minim
  12. radar
  13. murdrum
  14. malayalam
  15. madam
  16. lemel
  17. level
  18. racecar
  19. radar
  20. redder
  21. bob
  22. pop
  23. tot
  24. refer
  25. reviver
  26. rotator
  27. rotavator
  28. stats
  29. solos
  30. tenet
  31. terret
  32. testset
  33. kinikinik
  34. wassamassaw

Answer: //g