Bug 26075 - A regex that fails to compile
Summary: A regex that fails to compile
Status: RESOLVED DUPLICATE of bug 22884
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: 0.20
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2006-02-02 12:44 UTC by Andrew Cowie
Modified: 2006-02-03 07:26 UTC (History)
2 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cowie 2006-02-02 12:44:03 UTC
Real Java parses this regex:


and carries on, but Classpath 0.20 (running in JamVM) barfs with the following error:

Caused by: java.util.regex.PatternSyntaxException: At position 1 in regular expression pattern:
quantifier (?*+{}) without preceding token
   at java.util.regex.Pattern.<init> (Pattern.java:107)
   at java.util.regex.Pattern.compile (Pattern.java:146)
   at java.util.regex.Pattern.compile (Pattern.java:128)
   at org.jibble.logbot.LogBot.<clinit> (LogBot.java:11)

No, I didn't write that regex, but it's supposed to locate basic URIs for later extraction and substituion. Feel free to tell me that it's bad regex syntax, but as I said, Sun's VM + class library parses it (which is probably sad on their part, but anyway).

Comment 1 Mark Wielaard 2006-02-02 13:45:20 UTC
This is a duplicate of bug #25812 and the same regexp (also from the jibble LogBot) was reported as bug #22943 (only partly solved).

*** This bug has been marked as a duplicate of 25812 ***
Comment 2 Ito Kazumitsu 2006-02-02 17:01:23 UTC
This is a duplicate of Bug #22884 and it has been fixed.  Bug #25812 is still pending.   
Comment 3 Ito Kazumitsu 2006-02-02 17:02:15 UTC

*** This bug has been marked as a duplicate of 22884 ***
Comment 4 Andrew Cowie 2006-02-03 07:26:11 UTC
Shit - I swear I searched on regex before I filed this. Grr and other comments. Oh well. Sorry for the dup.

Incidentally, the pircbot base library runs fine in JamVM.