Strings Tutorial, Pattern Matching

From Progzoo
Revision as of 19:43, 12 September 2012 by 08014201 (talk | contribs) (Bellerophon)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

These questions use the simple text file greeks.txt - this file includes around three hundred characters from Greek legends.

You may want to review the following:


Earth goddess Gaea matches the pattern ".a.a"

Find all the names that match the pattern ".a.a"

[Font] [Default] [Show] [Resize] [History] [Profile]


Icarus perished because he flew too close to the sun on wings fixed with wax.

Icarus is one of several names containing the string "ca".

Print the names matching the pattern ".*ca.*"

[Font] [Default] [Show] [Resize] [History] [Profile]

Scrabble favourites

Print the names that include Q or Z or q or z

[Font] [Default] [Show] [Resize] [History] [Profile]


The river Styx gave Achilles his near invincibilty.

The word contains no vowels (aeiou).

Print the names that are a sequence of non-vowels.

[Font] [Default] [Show] [Resize] [History] [Profile]


Bellerphon defeated the Chimera with the help of the winged horse Pegasus.

The name Bellerphon includes a double letter "ll".

Print names that include consecutive double letters.

[Font] [Default] [Show] [Resize] [History] [Profile]