Hey, thanks for the reply.

I solved the problem earlier by making a generic function that will escape any given string's special characters. Actually, I borrowed that function from javaalmanac.com (search for regular expression, the method is called escapeRE).

Anyway, turns out the problem wasn't in my regular expression string (that is, replaceAll(String regex, String replacement), in regex), but in my replacement string -- it needs to be escaped too (duh!). It only took me a few hours to figure that out hehe

Anyway, thanks again for the help. We should keep in touch as fellow Java programmers.

Have a nice day!

-ik