Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ERROR! What does this error mean?

807603Dec 2 2007 — edited Dec 3 2007
Exception in thread "main" java.util.regex.PatternSyntaxException: Illegal repetition
{adj}
at java.util.regex.Pattern.error(Pattern.java:1713)
at java.util.regex.Pattern.closure(Pattern.java:2775)
at java.util.regex.Pattern.sequence(Pattern.java:1889)
at java.util.regex.Pattern.expr(Pattern.java:1752)
at java.util.regex.Pattern.compile(Pattern.java:1460)
at java.util.regex.Pattern.<init>(Pattern.java:1133)
at java.util.regex.Pattern.compile(Pattern.java:823)
at java.lang.String.replaceFirst(String.java:2147)
at MadLibs.MasterListandStories(MadLibs.java:31)
at MadLibsMain.main(MadLibsMain.java:6)

I dont get a compile error, but if i try to replace a word in a sentence w/ something the user types in i get the above error
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 31 2007
Added on Dec 2 2007
3 comments
186 views