jakarta-regexp-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörgen Kosche <jkos...@mnementh.de>
Subject Patch for Regexp
Date Sun, 25 Jul 2004 16:09:28 GMT

For some reason I need to match strings from the beginning of an
input-string and I dont want to load this string completely (from a file
or URL) if not needed. That should be possible, because the match
can be cancelled, if the first characters dont match.

Regexp doesn't do this, also if I start the regexp with a '^' and
activate the Flag MATCH_SINGLELINE. So I added a new flag to
match from the beginning of the string and stops, if the first
characters do not match. That also enhances the performance,
if the regexp dont match on a very long input-string.
To demonstrate this, I added the Performance.java that makes some
matches on very long strings.

I added in the patchtxt file the patch for RE.java itself, as created by
'cvs diff'.

Hope this patch will be helpful not only for me. Keep on the good work
on the regexp-library. Excuse my bad english, I'm not a native

Ciao, Jörgen Kosche
Jörgen 'Mnementh' Kosche
GPG: http://www.mnementh.de/public_key
Webseite: http://www.mnementh.de/

View raw message