Posts

Showing posts from February, 2009

SVN Upgrade from 1.4.5 - 1.5.5 (Apache 2.0.63 - 2.2.8)

For every person there are three basic things that are needed to survive,clothing,food and shelter.But as a software developer there is a fourth one that is needed to live.SVN is what I am talking about.

About 9 months ago we migrated from Visual Source Safe to Subversion, using Subversion is easy and a nice experience.

At the time of install, they had Subversion 1.4.5 and Apache Web Server 2.0.63.This week Subversion released a new version 1.5.5 and it seems some of the nice features are added to this version,so we want to do the upgrade.

In the old versions we were using multiple sources of authentication,domain based and file based.As we had some contracters outside the company it really worked out very well.

I uninstalled the old version of Apache and Subversion and installed new version using the collabnet subversion.

During the upgrade everything really went well except our multiple sources of authentication part.It seems that authauthoritative in mod_auth is removed from the new ve…

Regular Expression for Decimal Scientific and Fraction Values : ALL IN ONE

Regular expressions are really handy when user input needs to be validated.The following expression can be used to validate Decimal or Fraction or Scientific values.

^(([+-]?([0-9]*\d*\.\d{1}?\d*))(\-?(?:((\d+\s*)?\d+\/[1-9]+[0-9]*)(\d+(\s*\d+\/[1-9]+[0-9]*)?)))(^[+-]?[0-9]*(?:\.\d?)?[Ee][-+]?\d+))$

The big list of matches and non-matches below is the hard work of one of my colleagues.

Matches
0 ,0.0 ,-0 ,-0.0 ,+0 ,+0.0 ,0.1 ,-0.1 ,+0.1 ,1 ,1.1 ,-1 ,-1.1 ,+1 ,+1.1 ,1.1234567890 ,-1.1234567890 ,1.12345678901234567890 ,-1.12345678901234567890 ,0E0 ,-0E0 ,+0E0 ,
1E2 ,1E+2 ,1E-2 ,-1E2 ,-1E+2 ,-1E-2 ,+1E2 ,+1E+2 ,+1E-2 ,1.E+2 ,1.E-2 ,1.0E+2 ,1.0E-2 ,
.0E+2 ,-.0E+2 ,+.0E+2 ,.1E+2 ,-.1E+2 ,+.1E+2 ,12345678901234567890E+2 ,1.0e+2 ,0/1 ,
-0/1 ,1/1 ,-1/1 ,1 0/1 ,1 1/1 ,-1 1/1 ,0 1/1 ,-0 1/1 ,1/8 ,-1/8 ,1 1/8 ,-1 1/8 ,10/8 ,12345/12346

Non-Matches
. ,&5 ,1,2 ,1d5 ,-1- ,-1.-1 ,+1+ ,+1.1+ ,E ,.E ,E0 ,0E ,-E0 ,-0E ,+E0 ,+0E ,1E++2 ,1E+-2 ,1E+2- ,
1E+2+ ,1E-+2 ,1E--2 ,1E-2- ,1E-2+ ,1E+.2 ,1E+2. ,1E+2.0 ,1…