From oro-useryruiz@example.com Fri Mar 19 17:38:14 2004
Return-Path: <oro-useryruiz@example.com>
Delivered-To: yruiz@example.com
Received: (qmail 41697 invoked from network); 19 Mar 2004 17:38:14 -0000
Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur-2.apache.org with SMTP; 19 Mar 2004 17:38:14 -0000
Received: (qmail 46849 invoked by uid 500); 19 Mar 2004 17:38:06 -0000
Delivered-To: yruiz@example.com
Received: (qmail 46828 invoked by uid 500); 19 Mar 2004 17:38:06 -0000
Mailing-List: contact yruiz@example.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:yruiz@example.com>
List-Subscribe: <mailto:yruiz@example.com>
List-Help: <mailto:yruiz@example.com>
List-Post: <mailto:yruiz@example.com>
List-Id: "ORO Users List" <oro-user.jakarta.apache.org>
Reply-To: "ORO Users List" <yruiz@example.com>
Delivered-To: mailing list yruiz@example.com
Received: (qmail 46814 invoked from network); 19 Mar 2004 17:38:06 -0000
Received: from unknown (HELO ns1017.sssi.seagull.nl) (83.161.120.155)
  by daedalus.apache.org with SMTP; 19 Mar 2004 17:38:06 -0000
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Subject: No debug info in 2.0.8 class files
X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Date: Fri, 19 Mar 2004 12:38:04 -0500
Message-ID: <yruiz@example.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: No debug info in 2.0.8 class files
Thread-Index: AcQN2O6k0nNY+cQnShagRg8OtXV+nQ==
From: "Gary Gregory" <yruiz@example.com>
To: <yruiz@example.com>
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

Hello,

There does not seem to be debug information (line numbers) in the 2.0.8
jar class files. Is this an omission or by design? It certainly would be
more friendly to include these at almost no cost.=20

Thank you,
Gary=20



---------------------------------------------------------------------
To unsubscribe, e-mail: yruiz@example.com
For additional commands, e-mail: yruiz@example.com


From oro-useryruiz@example.com Wed Mar 31 17:22:24 2004
Return-Path: <oro-useryruiz@example.com>
Delivered-To: yruiz@example.com
Received: (qmail 73244 invoked from network); 31 Mar 2004 17:22:24 -0000
Received: from daedalus.apache.org (HELO mail.apache.org) (83.161.120.155)
  by minotaur-2.apache.org with SMTP; 31 Mar 2004 17:22:24 -0000
Received: (qmail 39207 invoked by uid 500); 31 Mar 2004 17:22:15 -0000
Delivered-To: yruiz@example.com
Received: (qmail 39193 invoked by uid 500); 31 Mar 2004 17:22:15 -0000
Mailing-List: contact yruiz@example.com; run by ezmlm
Precedence: bulk
List-Unsubscribe: <mailto:yruiz@example.com>
List-Subscribe: <mailto:yruiz@example.com>
List-Help: <mailto:yruiz@example.com>
List-Post: <mailto:yruiz@example.com>
List-Id: "ORO Users List" <oro-user.jakarta.apache.org>
Reply-To: "ORO Users List" <yruiz@example.com>
Delivered-To: mailing list yruiz@example.com
Received: (qmail 39140 invoked from network); 31 Mar 2004 17:22:14 -0000
Received: from unknown (HELO imf16aec.mail.bellsouth.net) (83.161.120.155)
  by daedalus.apache.org with SMTP; 31 Mar 2004 17:22:14 -0000
Received: from muleworkrt ([83.161.120.155]) by imf16aec.mail.bellsouth.net
          (InterMail vM.83.161.120.155 201-253-122-130-108-20031117) with SMTP
          id <20040331172218.SOIM1715.imf16aec.mail.bellsouth.net@muleworkrt>
          for <yruiz@example.com>;
          Wed, 31 Mar 2004 12:22:18 -0500
From: "Robert Taylor" <yruiz@example.com>
To: <yruiz@example.com>
Subject: splitting a search string into tokens
Date: Wed, 31 Mar 2004 12:23:47 -0500
Message-ID: <yruiz@example.com>
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Importance: Normal
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

Greetings, I have a few simple applications which query the database given a search string.
I need to parse the search string into tokens in the manner that search engines would.
For example, if someone entered the following string in a search field:

Java's "my favorite" programming language!

I would like to get a collection of tokens like:

Java's, "my favorite", programming, language!


So I need to split up a string based on the following requirements:

.Tokens are separated by white space
.Tokens are separated by matching quotes
 - If there is single double quote,
   them match from the first occurence of the double quote
   to the end of the string.
.Ignore any metacharacters in the search string

I have Googled and came across what seemed to be a partial solution here:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=pan.283.161.120.155.05.42.322748.1437%40kamelfreund.de&rnum=8&prev
=/groups%3Fq%3DSplitting%2Ba%2Bstring%2Bregexp%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3Dpan.283.161.120.155.05.42.322748.1
437%2540kamelfreund.de%26rnum%3D8

I asked the Struts list, because it seems like a pretty common web application requirement.
http://yruiz@example.com/msg96258.html

And received a suggestion for using Lucene and another one suggesting using java.lang.String.split()

I looked into using Lucene, but I don't need anything that "heavy". I even tried to see if part of its
API would give me what I need, but couldn't find anything.

I tried using java.lang.String.split() and it doesn't support the OR operator which I think I will need.

So I downloaded ORO in the hopes that the Perl5Util.split() would do it for me.

To make matters worse, my regular expression knowlege is yruiz@example.com.


Here is what I've tried (but it doesn't cover escaping metacharacters which might be in the search string):

    /"(.*?)"|(\w+)/

Prints the following after Perl5Util.split()
[, Java, ', s,  , my favorite,  , programming,  , language, !]


Any suggestions would be greatly appreciated.


robert





---------------------------------------------------------------------
To unsubscribe, e-mail: yruiz@example.com
For additional commands, e-mail: yruiz@example.com



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