Re: Test code for regex queries

2005-12-04 Thread Erik Hatcher
Following up on the (Span)RegexQuery topic, I've started working on moving this code to contrib/regex so that it can leverage various regex implementations. I'm making a generic interface that currently (though subject to change) has these methods: void compile(String pattern); boolean

Re: Test code for regex queries

2005-11-26 Thread Paul Elschot
On Friday 25 November 2005 11:14, Erik Hatcher wrote: > > On 24 Nov 2005, at 20:26, Erik Hatcher wrote: > >> There are some older regex implementations in java, but I > >> have no idea about the licences and the availabiility. > >> Doesn't apache have one somewhere? > > > > Two actually! ORO and

Re: Test code for regex queries

2005-11-25 Thread Erik Hatcher
On 24 Nov 2005, at 20:26, Erik Hatcher wrote: There are some older regex implementations in java, but I have no idea about the licences and the availabiility. Doesn't apache have one somewhere? Two actually! ORO and Regexp. Here's ORO - jakarta.apache.org/oro/> (link to Regexp from there)

Re: Test code for regex queries

2005-11-24 Thread Erik Hatcher
On 24 Nov 2005, at 11:57, Paul Elschot wrote: Capturing groups and special contexts need normal brackets (). Maybe we have a terminology mismatch. I call these (parentheses) and these [brackets]. Capturing groups are used for replacements, and I don't see a use for that in a query langua

Re: Test code for regex queries

2005-11-24 Thread Paul Elschot
On Thursday 24 November 2005 10:25, Erik Hatcher wrote: > > On 24 Nov 2005, at 03:17, Paul Elschot wrote: > >> I must admit that I haven't used the surround parser. For my custom > >> parser (a legacy syntax that no one here would want), I take any term > >> that has an *, ?, or [...] syntax as a

Re: Test code for regex queries

2005-11-24 Thread Erik Hatcher
On 24 Nov 2005, at 03:17, Paul Elschot wrote: I must admit that I haven't used the surround parser. For my custom parser (a legacy syntax that no one here would want), I take any term that has an *, ?, or [...] syntax as a regex term. I had another look at the javadocs of java regex package.

Re: Test code for regex queries

2005-11-24 Thread Paul Elschot
On Thursday 24 November 2005 00:06, Erik Hatcher wrote: > > On 23 Nov 2005, at 15:42, Paul Elschot wrote: > > I refactored it to have a few more tests, and all seems to work well. > > It also includes the tests from TestSpanRegexQuery.java . > > ... > > > To parse a regex query term, the surround

Re: Test code for regex queries

2005-11-23 Thread Erik Hatcher
On 23 Nov 2005, at 15:42, Paul Elschot wrote: I refactored it to have a few more tests, and all seems to work well. It also includes the tests from TestSpanRegexQuery.java . Two questions: Can I assume the APL2 on Test{,Span}RegexQuery.java? If so, I'll post the refactored version with it. Y

Test code for regex queries

2005-11-23 Thread Paul Elschot
Dear readers, I'd like to add regex queries to the surround parser, so I had a look at the test code for the regex queries. I refactored it to have a few more tests, and all seems to work well. It also includes the tests from TestSpanRegexQuery.java . Two questions: Can I assume the APL2 on Test