[jsword-devel] Range searches
Chris Burrell
chris at burrell.me.uk
Sat Apr 26 05:29:25 MST 2014
The code in question:
Matcher rangeMatcher = RANGE_PATTERN.matcher(sought);
/**
* The pattern of a range. This is anything that is contained between a
* leading [] (but not containing a [ or ]), with a + or - optional
prefix,
* perhaps surrounded by whitespace.
*/
private static final Pattern RANGE_PATTERN =
Pattern.compile("^\\s*([-+]?)\\[([^\\[\\]]+)\\]\\s*");
The comment doesn't seem to make clear it should be at the start... Not
sure if there is a technical constraint...
Chris
On 26 April 2014 13:28, Chris Burrell <chris at burrell.me.uk> wrote:
> Hello
>
> Just wondering if there is any particular reason for the range pattern to
> be forced to be the starting block of the query...
>
> i.e.
>
> +[Gen] Abraham (works)
> Abraham +[Gen] (doesn't work).
>
> Chris
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/jsword-devel/attachments/20140426/87931f63/attachment.html>
More information about the jsword-devel
mailing list