Regular Expressions in Java

Package com.stevesoft.pat version 1.5.3

Home
Articles/Links
Mugs, T-shirts Comments/Raves
New in 1.5.3
A Game
An Online Test
Questions


Copyright/License
Download Free

 If you need a non-LGPL version
You Can Buy!

Online help...
Quick Start
Tutorial Part 1
Tutorial Part 2
Tutorial Part 3
Tutorial Part 4
Tutorial Part 5
Tutorial Part 6
Examples
Support
FAQ
Documentation

Useful apps...
Java Beautifier
Code Colorizer
GUI Grep
Swing Grep

Other stuff...
Phreida
xmlser

ReGame, the regular expression game

First, a test to see if you are a real computer geek. If you are, then you should enjoy this game. If not, perhaps it isn't for you. In any event, you need to understand regular expressions to be able to play.

You know you're a geek when...

  • ...you call yourself multi-lingual because you speak perl, C++, java and a little Klingon.
  • ...you think that fake rubber Spock ears are the perfect accessory for a chainmail bikini.
  • ...when the garbage collectors come you go out and give them pointers.
  • ...you understood the pun in the previous item.
  • ...you think there should be games based on regular expressions.

This applet works like the test applet on the test page. In that applet, you can type in a pattern and some text, and then you can see the results of applying that pattern to text. ReGame uses the same format, but there are three pieces of text against which to match the pattern, and the pattern is initially hidden. In the input box, you should type in a pattern and then hit the return key. If you get it right, you will score points.

In the display below each of the three the text input fields, the result of the match is shown. The match is given by black and red text placed between two green arrows. The matched text is in red, the unmatched portions in black, and the backreferences (things matched by ()'s) are given below it. You must match both the pattern and the backreferences to score.

Scoring is as follows: 10 points for each pattern matched, 5 points if your pattern is longer than the hidden pattern string, 12 points if it is shorter. There should be enough patterns here for you to play the game several times without annoying repitition.

It is my dream (fantasy) that this game will catch on, and internet web-zines for computer types will have a regex puzzle section similar to crossword puzzles in paper newspapers. Probably not. In any event, an editor for building the appropriate name/value tags for the ReGame applet (so that you can make your own regex puzzles) will be provided with a registered version of this package.


Tell us how great you think our game is!
I'm so impressed, I'll buy now!