Are you regular?
Do you wonder about regular expressions? Let’s take a quick look at a simple use of regular expressions. Alfred Thompson got me thinking about making a pong game, and now I want to do a pong game in a bunch of different ways.
Open a new project in C# and you can cut and past the following into your application, the namespace in this example doesn’t make any difference.
When you run the code you will get a nice output with a header and a simple output.
Your output will look like the following (press ctrl+F5)
The “\t” represents a “regular” expression, and the \t is a tab or non-printing character. You can find out more about these characters by going to:
You will see some interesting “regular expressions”, for instance the \a is the “bell” character. If you use it in the code above using the following, you will hear some soft beeps. In the old days this would fire off a harsh bell on the telex or teletype machine, sometimes if you watch old movies sometimes you will hear this in a busy newsroom or “war room”.
So take a look at the regular expressions and have some fun with them. You should be able to use this blog to get started and to see your output.