From regexp-user-eellis@example.org Thu Sep 18 02:21:02 2003
Return-Path: <regexp-user-eellis@example.org>
Delivered-To: eellis@example.org
Received: (qmail 54078 invoked from network); 18 Sep 2003 02:21:02 -0000
Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur-2.apache.org with SMTP; 18 Sep 2003 02:21:02 -0000
Received: (qmail 10618 invoked by uid 500); 18 Sep 2003 02:20:43 -0000
Delivered-To: eellis@example.org
Received: (qmail 10602 invoked by uid 500); 18 Sep 2003 02:20:42 -0000
Mailing-List: contact eellis@example.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:eellis@example.org>
List-Subscribe: <mailto:eellis@example.org>
List-Help: <mailto:eellis@example.org>
List-Post: <mailto:eellis@example.org>
List-Id: "Regexp Users List" <regexp-user.jakarta.apache.org>
Reply-To: "Regexp Users List" <eellis@example.org>
Delivered-To: mailing list eellis@example.org
Received: (qmail 10589 invoked from network); 18 Sep 2003 02:20:42 -0000
Received: from unknown (HELO main.gmane.org) (83.161.120.155)
  by daedalus.apache.org with SMTP; 18 Sep 2003 02:20:42 -0000
Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 19zoPJ-0002OL-00
	for <eellis@example.org>; Thu, 18 Sep 2003 04:20:33 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: eellis@example.org
Received: from sea.gmane.org ([83.161.120.155])
	by main.gmane.org with esmtp (Exim 3.35 #1 (Debian))
	id 19zn7s-0001oU-00
	for <eellis@example.org>; Thu, 18 Sep 2003 02:58:28 +0200
Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian))
	id 19zn88-0001TR-00
	for <eellis@example.org>; Thu, 18 Sep 2003 02:58:44 +0200
From: Venkatesh Prasad Ranganath <eellis@example.org>
Subject: A matter of comparison
Date: Wed, 17 Sep 2003 19:56:45 -0500
Lines: 15
Message-ID: <eellis@example.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: eellis@example.org
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030702
X-Accept-Language: en-us, en
Sender: news <eellis@example.org>
Cc: eellis@example.org
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N

Hi,

I am posting on both groups as I am deciding.  How does ORO and RegExp compare to the regexp package in Java?  Pros and Cons? 
  I am looking for comparitive info (speed, space, features) to decide which I should pick.  Of course, I will try to search 
for articles which deal with these topics, but any input based on real world experience would be appreciated.

waiting for reply,

-- 

Venkatesh Prasad Ranganath,
Dept. Computing and Information Science,
Kansas State University, US.
web: http://www.cis.ksu.edu/~rvprasad



---------------------------------------------------------------------
To unsubscribe, e-mail: eellis@example.org
For additional commands, e-mail: eellis@example.org


From regexp-user-eellis@example.org Thu Sep 18 17:11:52 2003
Return-Path: <regexp-user-eellis@example.org>
Delivered-To: eellis@example.org
Received: (qmail 14521 invoked from network); 18 Sep 2003 17:11:52 -0000
Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur-2.apache.org with SMTP; 18 Sep 2003 17:11:52 -0000
Received: (qmail 93976 invoked by uid 500); 18 Sep 2003 17:11:43 -0000
Delivered-To: eellis@example.org
Received: (qmail 93959 invoked by uid 500); 18 Sep 2003 17:11:42 -0000
Mailing-List: contact eellis@example.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:eellis@example.org>
List-Subscribe: <mailto:eellis@example.org>
List-Help: <mailto:eellis@example.org>
List-Post: <mailto:eellis@example.org>
List-Id: "Regexp Users List" <regexp-user.jakarta.apache.org>
Reply-To: "Regexp Users List" <eellis@example.org>
Delivered-To: mailing list eellis@example.org
Received: (qmail 7082 invoked from network); 18 Sep 2003 07:25:59 -0000
Message-ID: <eellis@example.org>
In-Reply-To: <eellis@example.org>
References: <eellis@example.org>
Date: Thu, 18 Sep 2003 09:26:11 +0200 (CEST)
Subject: Re: A matter of comparison
From: eellis@example.org
To: "ORO Users List" <eellis@example.org>
Cc: eellis@example.org
User-Agent: SquirrelMail/1.4.2 [CVS]
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N

I'm a very happy oro user because it matches the perl5.x regexps best.
Speed is not really an issue for me as I use it merely in batch like
processes. Rarely in reallife internet apps.
I would recommend boycotting Sun and their regexp, as they ccuurently
copy-paste all the nice open source code in a Micro$oft way (without the
$$). Besides that a lot of java programmers still use 1.3, using 1.4
regexp would make your code downwards incompatible. On the other hand I
remember a mail from Daniel F S @ some point stating that oro is slower
than sun 1.4 regexp.
I wouldnt use jakarta regexp, as I ve never seen being used. Oro is
supplied in many industry packages, and I would consider it the industry
standard for this moment.
Maybe you should use both and see which one you like best!
Good luck,
Jeroen.

> Hi,
>
> I am posting on both groups as I am deciding.  How does ORO and RegExp
> compare to the regexp package in Java?  Pros and Cons?
>   I am looking for comparitive info (speed, space, features) to decide
> which I should pick.  Of course, I will try to search
> for articles which deal with these topics, but any input based on real
> world experience would be appreciated.
>
> waiting for reply,
>
> --
>
> Venkatesh Prasad Ranganath,
> Dept. Computing and Information Science,
> Kansas State University, US.
> web: http://www.cis.ksu.edu/~rvprasad
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: eellis@example.org
> For additional commands, e-mail: eellis@example.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: eellis@example.org
For additional commands, e-mail: eellis@example.org


From regexp-user-eellis@example.org Fri Sep 19 08:56:15 2003
Return-Path: <regexp-user-eellis@example.org>
Delivered-To: eellis@example.org
Received: (qmail 8016 invoked from network); 19 Sep 2003 08:56:15 -0000
Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur-2.apache.org with SMTP; 19 Sep 2003 08:56:15 -0000
Received: (qmail 3950 invoked by uid 500); 19 Sep 2003 08:55:48 -0000
Delivered-To: eellis@example.org
Received: (qmail 3917 invoked by uid 500); 19 Sep 2003 08:55:47 -0000
Mailing-List: contact eellis@example.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:eellis@example.org>
List-Subscribe: <mailto:eellis@example.org>
List-Help: <mailto:eellis@example.org>
List-Post: <mailto:eellis@example.org>
List-Id: "Regexp Users List" <regexp-user.jakarta.apache.org>
Reply-To: "Regexp Users List" <eellis@example.org>
Delivered-To: mailing list eellis@example.org
Received: (qmail 3874 invoked from network); 19 Sep 2003 08:55:47 -0000
Received: from unknown (HELO twin.jikos.cz) (83.161.120.155)
  by daedalus.apache.org with SMTP; 19 Sep 2003 08:55:47 -0000
Received: from localhost (ondra@localhost)
	by twin.jikos.cz (8.11.6/8.11.6) with ESMTP id h8J8tx514430
	for <eellis@example.org>; Fri, 19 Sep 2003 10:55:59 +0200
Date: Fri, 19 Sep 2003 10:55:58 +0200 (CEST)
From: Ondra Nekola <eellis@example.org>
To: eellis@example.org
Subject: Regexp efficienty
Message-ID: <eellis@example.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N

I have an following program, that leads to java.lang.StackOverflowError
import org.apache.regexp.RE;

public class RegexpTest {

	public static void main(String[] args) {
		System.out.println("START");

		String str = 
"506c61746261207a61206eec636f20646f737420646f6272fd686f"+
		"506c61746261207a61206eec636f20646f737420646f6272fd686f"+
"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f"
+"506c61746261207a61206eec636f20646f737420646f6272fd686f";

		String regexpString = 
"(((([:alpha:]|[:digit:])+)\\.){1,2})"; // <-- almost smallest construction, that leads to problems 
		
	
		for (int i = 0; i < str.length(); i+=10) {
			String sub = str.substring(0, i);
			RE r = new RE(regexpString);
			long ts = System.currentTimeMillis();
			r.match(sub);
			System.out.println("Matching [" + i + "] TIME: " + 
(System.currentTimeMillis() - ts));
		}		
	}
}

It seems to me, that regexp implementatiopn shouldn't use recursion but it 
should use finite automata. But both apache implementation and Sun 
one lead to problems (the Sun one seems to have exponential time requirements 
in some similar cases). 
I'm not sure what to do. Is there an regexp implementation, that works OK 
in all cases or should I learn some patterns, that cause troubles and not to 
use them. Or should I create an implementetion, that works fine? :) Or do 
I do some trivial bug I haven't notice?
 -- 
   S pozdravem
       Ondrej Nekola
       eellis@example.org
       http://www.matfyz.cz/ondra

---------------------------------------------------------------------
To unsubscribe, e-mail: eellis@example.org
For additional commands, e-mail: eellis@example.org


From regexp-user-eellis@example.org Tue Sep 23 04:01:31 2003
Return-Path: <regexp-user-eellis@example.org>
Delivered-To: eellis@example.org
Received: (qmail 89433 invoked from network); 23 Sep 2003 04:01:30 -0000
Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur-2.apache.org with SMTP; 23 Sep 2003 04:01:30 -0000
Received: (qmail 96607 invoked by uid 500); 23 Sep 2003 04:01:10 -0000
Delivered-To: eellis@example.org
Received: (qmail 96574 invoked by uid 500); 23 Sep 2003 04:01:09 -0000
Mailing-List: contact eellis@example.org; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:eellis@example.org>
List-Subscribe: <mailto:eellis@example.org>
List-Help: <mailto:eellis@example.org>
List-Post: <mailto:eellis@example.org>
List-Id: "Regexp Users List" <regexp-user.jakarta.apache.org>
Reply-To: "Regexp Users List" <eellis@example.org>
Delivered-To: mailing list eellis@example.org
Received: (qmail 96550 invoked from network); 23 Sep 2003 04:01:09 -0000
Received: from unknown (HELO main.gmane.org) (83.161.120.155)
  by daedalus.apache.org with SMTP; 23 Sep 2003 04:01:09 -0000
Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 1A1eM7-0005tO-00
	for <eellis@example.org>; Tue, 23 Sep 2003 06:00:51 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: eellis@example.org
Received: from sea.gmane.org ([83.161.120.155])
	by main.gmane.org with esmtp (Exim 3.35 #1 (Debian))
	id 1A1eFJ-0005aI-00
	for <eellis@example.org>; Tue, 23 Sep 2003 05:53:49 +0200
Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian))
	id 1A1eFk-0007QQ-00
	for <eellis@example.org>; Tue, 23 Sep 2003 05:54:16 +0200
From: Vadim Gritsenko <eellis@example.org>
Subject: Re: Regexp efficienty
Date: Mon, 22 Sep 2003 23:54:16 -0400
Lines: 27
Message-ID: <eellis@example.org>
References: <eellis@example.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: eellis@example.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030916
X-Accept-Language: en-us, en
In-Reply-To: <eellis@example.org>
Sender: news <eellis@example.org>
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N
X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N

Ondra Nekola wrote:
> I have an following program, that leads to java.lang.StackOverflowError

...

> I'm not sure what to do. Is there an regexp implementation, that works OK 
> in all cases or should I learn some patterns, that cause troubles and not to 
> use them. Or should I create an implementetion, that works fine? :)

There is a bug report in BugZilla which basically says the same, i.g. 
that RegExp uses recursive algorithm, and thus, obviously has limits due 
to stack size limits.

Your options are:
  * Increase stack size
  * Use another regexp implementation (oro?)
  * Improve this regexp package

If you choose the last option, and you succeed, I can help in getting 
your code into the next regexp version.


PS You can also see what patterns behave worse and what behave better - 
and avoid bad ones :)

Vadim



---------------------------------------------------------------------
To unsubscribe, e-mail: eellis@example.org
For additional commands, e-mail: eellis@example.org



{'source': 'Apache Software Foundation Public Mail Archives'}