When I try to use your regular expression I get:
java.util.regex.PatternSyntaxException: Unclosed character class near index 8
[a-zA-Z\.
Ray Hooker wrote:
I was trying to use the new regex support and am having a problem. There are basically two options it seems: 1. Use the Pattern and Matcher classes in the java.util.regex 2. Use the .matches method in the string class
I am using Netbeans 3.5 bundled with the latest Sun Java SDK 1.4.2 running on Windowx XP. I have tried both options and seem to have the same problem. I am able to build all cleanly (yes I do import java.util.regex.*) but when I try to debug it is gets the following error:
"Thread AWT-EventQueue-0 stopped at java.util.regex.Pattern.matches line 865 - unavailable source file"
The offending statement is:
if (Pattern.matches("[a-zA-Z\\.", tok7)) {
I have tried several alternatives but get similar messages. It seems weird that it builds correctly and then has a problem in runtime. Pardon for the potentially ignorant question.
I recently used the JDK 1.4 regex support for the first time. Being new to it and having no experience with Perl, I found the syntax of regular expressions more involved and difficult than I had expected.
Rich Hammer
_______________________________________________ Juglist mailing list [EMAIL PROTECTED] http://trijug.org/mailman/listinfo/juglist_trijug.org
