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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-02 12:44 UTC by Andrew Cowie
Modified: 2006-02-03 07:26 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

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:

  (?i:\\b((http|https|ftp|irc)://[^\\s]+))

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
        (?i:\b((http|https|ftp|irc)://[^\s]+))
         ^
   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).

AfC
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
Fixed.



*** 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.

AfC