A series of tutorials on Regular Expressions.
Learn how to write, read, and use Regular Expressions by completing or correcting code to make failing Unit Tests pass. Each Koan includes a series of Unit Tests which illustrate Regular Expression principles and techniques. I have made an effort to avoid making forward references in the tutorial sequence, but there are enough back references to earlier Koans that it would be best to complete the Koans in the order presented.
Ruby's Regular Expression engine is very similar to that of many other programming languages. It differs only in esoteric details.
To practice, to try out some code before using it in your program, or just to play around, rubular is a fantastic Regular Expression resource. This web tool should be in the Bookmarks list of every programmer.
With many thanks to:
- Aaron Brown for the original Javascript version of the Regex Koans
 - EdgeCase for the original, inspired, and inspirational Ruby Koans
 
Checkout or download the zipped version of this project and extract it to a folder.
- navigate to the directory you extracted your files to in a terminal
 - run bundle
 - run rake
 - Edit the .rb file that the rspec results tell you to edit
 - run rake again until all the tests are passing.