Why not use strtolower on the string after the replacements have been made?
-- http://www.web-buddha.co.uk