jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 5243] New: - Regexp 1.2 RE.match() hangs java.exe
Date Mon, 03 Dec 2001 17:57:37 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5243>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5243

Regexp 1.2 RE.match() hangs java.exe

           Summary: Regexp 1.2 RE.match() hangs java.exe
           Product: Regexp
           Version: unspecified
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: regexp-dev@jakarta.apache.org
        ReportedBy: darrell.plant@imagegen.net


Matching certain strings against patterns like:
[A-Z]{1,127}@[A-Z]{1,127}

hangs java.exe
eg match using string:
AAAAA

Tested as follows:

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import org.apache.regexp.RE;

public class testIt
{
	public static void main(String[] args) throws Exception
	{
		BufferedReader console = new BufferedReader(
						new InputStreamReader
(System.in));     
		
		System.out.println("RE Pattern?: ");
		String input = console.readLine();
		
		RE r = new RE(input);
		while (true)
		{
			System.out.println("test against?: ");
			String test = console.readLine();
			System.out.println("Pattern is: " + test);
			
			boolean matched = r.match(test);
			System.out.println("MATCHED="+matched);
			
			String wholeExpr = r.getParen(0);
			System.out.println("wholeExpr IS: "+ wholeExpr);
		}
	}
}


RE Pattern:
([A-Z]{1,127}@[A-Z]{1,127})

Hangs java.exe when matched against:
AAAAA

Darrell.

--
To unsubscribe, e-mail:   <mailto:regexp-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:regexp-dev-help@jakarta.apache.org>


Mime
View raw message