Jon is right of course. See
the 1.4 API for String and follow the links to "
regular expression" for more details. Basically, it turns out ? is a special character in regular expressions, and needs a preceeding \ as an escape sequence. As it happens, \ is also a special character in Java string literals, and to create a normal \ you need another preceeding \ as an escape sequence. So combining these rules you need "\\?" to represent a single ? char in a
pattern. Very
I know - but that's the way it is.
[ January 09, 2003: Message edited by: Jim Yingst ]