tomhoppe.com

Archive for 2008

Regular Expression Cheat Sheet

Monday, August 11th, 2008

I just wanted to give myself a reference for a regular expression cheat sheet. This is much easier then forgetting and having to google for what I need. Pretty much all you ever need to know to setup a regexp.

. Matches any single character (many applications exclude newlines, and exactly which characters are considered newlines is flavor, character encoding, and platform specific, but it is safe to assume that the line feed character is included). Within POSIX bracket expressions, the dot character matches a literal dot. For example, a.c matches “abc“, etc., but [a.c] matches only “a“, “.“, or “c“.
[ ] A bracket expression. Matches a single character that is contained within the brackets. For example, [abc] matches “a“, “b“, or “c“. [a-z] specifies a range which matches any lowercase letter from “a” to “z“. These forms can be mixed: [abcx-z] matches “a“, “b“, “c“, “x“, “y“, and “z“, as does [a-cx-z].

The - character is treated as a literal character if it is the last or the first character within the brackets, or if it is escaped with a backslash: [abc-], [-abc], or [a\-bc].

[^ ] Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than “a“, “b“, or “c“. [^a-z] matches any single character that is not a lowercase letter from “a” to “z“. As above, literal characters and ranges can be mixed.
^ Matches the starting position within the string. In line-based tools, it matches the starting position of any line.
$ Matches the ending position of the string or the position just before a string-ending newline. In line-based tools, it matches the ending position of any line.
\( \) Defines a marked subexpression. The string matched within the parentheses can be recalled later (see the next entry, \n). A marked subexpression is also called a block or capturing group.
\n Matches what the nth marked subexpression matched, where n is a digit from 1 to 9. This construct is theoretically irregular and was not adopted in the POSIX ERE syntax. Some tools allow referencing more than nine capturing groups.
* Matches the preceding element zero or more times. For example, ab*c matches “ac“, “abc“, “abbbc“, etc. [xyz]* matches “”, “x“, “y“, “z“, “zx“, “zyx“, “xyzzy“, and so on. \(ab\)* matches “”, “ab“, “abab“, “ababab“, and so on.
\{m,n\} Matches the preceding element at least m and not more than n times. For example, a\{3,5\} matches only “aaa“, “aaaa“, and “aaaaa“. This is not found in a few, older instances of regular expressions.

Granite!

Tuesday, July 29th, 2008

I can’t believe I’m blogging about a kitchen instead of the race car :)

Poor “RedRum” has been sitting in the driveway getting rained on. I discovered yesterday that I have a coolant leak somewhere. Looks to be around the middleish of the motor so maybe its a cracked hose or similar. Going to diagnose this weekend and get her ready for the Barber race at the end of August.

Ok, back to the kitchen. Got the granite installed today. Looks absolutely AWESOME.

Road Atlanta Win

Monday, July 21st, 2008

I had another awesome weekend at Road Atlanta. This time it was a super super hot July weekend with a SARRC 15 lap sprint race, and an ECR 90 minute enduro race with the old car owner as codriver. The sprint races are the ones I focus on, while we were just running the enduro so Dan could keep his competition license. In SCCA, you have to run 2 races a year to maintain a license.

The weekend started out with qualifying, and I put myself on pole by 2 seconds for the SARRC race. I only ran a 1:44.3, but considering the hot weather, it was a pretty good time that I was happy with. In the afternoon, Dan got in the car and shook some rust off, putting us middle of the pack for the start of the ECR. Saturday evening was eventful, with me leaving the new brake pads I needed at work. We had to drive back from Road Atlanta and ended up spending the night in Marietta. Next time I’m making a list before leaving the house :)

We put on the older Hoosier tires for Sunday morning’s 90 minute ECR. Immediately, I noticed a vibration above 100mph, which was probably an out of balance tire or two. I came into the pits after about 15 minutes instead of my 45, as I didn’t want to hurt the car. It wasn’t worth continuing with everything shaking, as this wasn’t a points race or anything. We took the tires off and got them balanced with enough time for Dan to get 45 mins in the car, and finish out the race. No damage, no real wear on the car, success!

Sunday afternoon was the SARRC Sprint. I put on some fresh(er) tires and got ready to kick some butt. It was a fairly uneventful race, which on one hand was nice, but I would have like to have a little more of a fight. I drove hard for 5 laps and put some time on the rest of the field. After that I put it on cruise control and finished off the win. It was the first win (out of 2 races) in the new car. The last one I broke an axle with a 15 second lead on the last lap :) Brian Cembor also came out to watch and took my camera for a spin. He ended up with a few great pics of my car, as well as Kirk’s Golf. These are also the first “evidence” of the new car on track! As a photographer, I never get to take pictures of my OWN car.

On a sadder note, it was a weekend full of carnage for some other racers. Everything from spins, to wall hits, to totalled cars, to flips. I got lucky avoiding the bad luck and came out of the weekend with no damage, other then the scrapes on the front bumper from some bump drafting :)

The Laptop "Drive of Shame"

Monday, July 14th, 2008

Funny article I read today from slashdot. I’ve done this I think 3 times in my 4 years at WebMD. With a 20+ minute commute, that sure sucks!

http://www.networkworld.com/community/node/29791

Finally worked on the race car

Saturday, July 12th, 2008

After what seemed like an eternity I finally got to work on the race car this morning. The next race is Road Atlanta next weekend. All the qualifyings will be on Saturday and then I will be doing a 30 minute sprint race by myself on Sunday morning and then splitting a 90 minute enduro with the old owner in the afternoon. Late July in Atlanta should be scorching so I’m going to start drinking water starting Monday. This should be a well attended weekend, so I should hopefully have some on track photos of the race car finally. Its nice being a photographer, but no one takes pictures of YOUR car. This time I’m going to set loose my camera with a bunch of friends and we’ll see what comes out :)

On the car note, I finished rebuilding both axles today. Just need the boot clamps and those can go back in the car. Holy CRAP that is a messy job. The grease that came out of the old ones was super nasty, but other then that, they looked great. Not sure if I’m going to drop the $300 on raxles unless I keep on breaking them. Hopefully the redline grease prevents the failure I had last race. Other then that, just need to bleed the brakes, a quick oil change, get the new tires mounted up and make sure all the bolts are tight. Might also do a quickie alignment to make sure everything is still square.

Lastly I broke out the powerwasher and washed all the mud off the jeep. It looks sort of weird being clean! We probably won’t get another chance to get her dirty again till August :(