Community

General and Everything Else => Everything-Else => Topic started by: gumby on September 25, 2010, 11:06:13 PM

Title: Regular expressions
Post by: gumby on September 25, 2010, 11:06:13 PM
For all you out there who have gone through the unbelievable pain of learning regular expressions should appreciate this: 

I just spent the last 4 hours troubleshooting code... ultimately to discover that the '.' character matches everything *except* a newline character.   Arrrggh.  RTFM.
Title: Re: Regular expressions
Post by: Collector on September 26, 2010, 03:24:00 PM
Reminds me of the time that I had to have one of my installers determine the version number of the game being installed before it applied a patch. It just didn't work. I even added a message box to the script to display the variable from reading the VERSION file, but it seemed to display the right information. It tuned out that the version number ended with a new line, which did not show in the message box. So my script was reading it properly, but I was not taking into account that the value included the new line when comparing it the the version number that needed to patched. Never make that mistake again.