 |
Java Games: Flashcards, matching, concentration, and word search. |
 |
 |
Regular expressions 2: Exercises
Test your knowledge of regular expressions (Perl version). Find the regex-string pairs that match. Assume CASE SENSITIVITY. References: - Vikram Vaswani and Harish Kamath: http://www.devshed.com/Server_Side/Administration/RegExp/ - Mastering Regular Expressions. Jeffrey E. F. Friedl, O'Reilly 1997 (Ch. 4: http://www.oreilly.com/catalog/regex/chapter/ch04.html ) - http://212.187.69.32/HenkS/Testaregex/index.html You could also try: Regular Expressions 1: Vocabulary ( http://www.quia.com/jg/71948.html )
|
| A | B |
| AB+A | ABA |
| AB*AA | AAA |
| [^AB]+A | CDEA |
| [A-Z][0-9] | F3 |
| [ABCDE^]A | ^A |
| [AB][CDE]A | BCA |
| A[AB]+[CDE]+A | AADEDEA |
| \d+\.\d{4} | 3.1415 |
| s\ss\ss | s s s |
| a.+\s+.* | a happy 2000 |
| \w/\w/\w | W/W/W |
| (AAA|BBB|CCC)A | AAAA |
| d\\\d\\\d | d\0\9 |
| d\\d\\d | d\d\d |
| A \W+ A | A ([^+-*/]) A |
| A[[\\\]]+A | A[\]A |
| \\D\D\\ | \DW\ |
| \\\W\W\\ | \\\\ |
| ([A-Z]\.){2,6} | H.P. |
| {\d,[0-6]} | {3,3} |
| ([Bb](\.|[Aa][Mm])\w*)+ | B. Bambam |
|
| |