lucy24 - 8:29 pm on May 31, 2013 (gmt 0)
I was using Deny from 168. xxx etc but I was told by the server that it took to too much processor time
Agree. With the responses, not with "the server" (assume you mean your host). A straight numerical IP block should be the least server-intensive thing you can do.
Also as already noted, the big problem in your original file is that every single UA has an opening anchor. Possibly you've been misinformed about what an anchor does; if you post back, someone will sort you out :)
:: insert obligatory plug for doing simple UA blocks in mod_setenvif using BrowserMatch or BrowserMatchNoCase in conjunction with "Deny from env=such-and-such" ::