Why are you trying to block visitors based on their useragent? Anyone would be easily aboe to get around the block simply by editing their useragent to match what you want it to be. Some browsers even allow the useragent to be set to different values for different sites. All of the popular browsers (except possibly for Chrome) allow the browser owner to easily set the useragent to any value they like.
Helping others to solve their computer problem at http://www.felgall.com/