<div dir="ltr">The code in question:<div><br></div><div>Matcher rangeMatcher = RANGE_PATTERN.matcher(sought);<br></div><div><br></div><div><div> /**</div><div> * The pattern of a range. This is anything that is contained between a</div>
<div> * leading [] (but not containing a [ or ]), with a + or - optional prefix,</div><div> * perhaps surrounded by whitespace.</div><div> */</div><div> private static final Pattern RANGE_PATTERN = Pattern.compile("^\\s*([-+]?)\\[([^\\[\\]]+)\\]\\s*");</div>
</div><div><br></div><div>The comment doesn't seem to make clear it should be at the start... Not sure if there is a technical constraint...</div><div>Chris</div><div><br></div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 26 April 2014 13:28, Chris Burrell <span dir="ltr"><<a href="mailto:chris@burrell.me.uk" target="_blank">chris@burrell.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hello<div><br></div><div>Just wondering if there is any particular reason for the range pattern to be forced to be the starting block of the query...</div><div><br></div><div>i.e. </div><div><br></div><div>
+[Gen] Abraham (works)</div>
<div>Abraham +[Gen] (doesn't work).</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Chris</div><div><br></div></font></span></div>
</blockquote></div><br></div>