I am trying to find the position of
string that matches the regular expression in a given '
word'. But for some reason I get the following Exception.
Exception in
thread "main" java.lang.IllegalStateException: No match available
at java.util.regex.Matcher.start(Matcher.java:325)
at myworkspace.TestRegEx.<init>(TestRegEx.java:16)
at myworkspace.TestRegEx.main(TestRegEx.java:21)
I have created a small program that demonstrates the problem, posted below. I would really appreciate some input on this. thanks