in reply to checking for reserved characters

I see no reason why your code shouldn't work. What did you use to test it?

Update: I'm tired today... The minute I dropped that code in my editor, I saw the problem.

the lowliest monk