Bug 22884 - java.util.regex.Pattern doesn't understand (?s)
Summary: java.util.regex.Pattern doesn't understand (?s)
Status: RESOLVED FIXED
Alias: None
Product: classpath
Classification: Unclassified
Component: classpath (show other bugs)
Version: unspecified
: P3 normal
Target Milestone: 0.90
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 22943 26075 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-23 14:26 UTC by from-classpath
Modified: 2006-02-02 17:02 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 from-classpath 2005-02-23 14:26:24 UTC
hi,

 I have a regular expression that uses one of the inline switches documented in the Sun javadoc implementation of java.util.regex.Pattern and when running under classpath I get the following error:

At position 1 in regular expression pattern:
quantifier (?*+{}) without preceding token
        (?s)<!--(.)+?-->

Comment 1 from-classpath 2005-02-23 14:28:26 UTC
(?s) is the DOTALL switch, which makes the wildcard . character match any character including newlines

rather than going through the class API, you can embedd the string (?s) in your pattern and DOTALL mode will be activated
Comment 2 cvs-commit@developer.classpath.org 2006-01-16 15:40:17 UTC
Subject: Bug 22884

CVSROOT:	/cvsroot/classpath
Module name:	classpath
Branch: 	
Changes by:	Ito Kazumitsu <itokaz@savannah.gnu.org>	06/01/16 13:38:25

Modified files:
	.              : ChangeLog 
	gnu/regexp     : RE.java RESyntax.java 

Log message:
	2006-01-16  Ito Kazumitsu  <kaz@maczuka.gcd.org>
	
	Fixes bug #22884
	* gnu/regexp/RE.java(initialize): Parse embedded flags.
	* gnu/regexp/RESyntax.java(RE_EMBEDDED_FLAGS): New syntax bit.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.6082&tr2=1.6083&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RE.java.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/gnu/regexp/RESyntax.java.diff?tr1=1.3&tr2=1.4&r1=text&r2=text



Comment 3 Ito Kazumitsu 2006-01-16 22:04:26 UTC
Fixed.  
Comment 4 Ito Kazumitsu 2006-01-16 22:19:21 UTC
*** Bug 22943 has been marked as a duplicate of this bug. ***
Comment 5 Ito Kazumitsu 2006-02-02 17:02:15 UTC
*** Bug 26075 has been marked as a duplicate of this bug. ***