I think it's already an optional feature; if you construct the regexp with
explicit syntax flags you can get an instance that won't consider '@'
special. Haven't actually had a need to do that so I'm assuming it works as
documented.

/** Syntax flag, enables anystring (<code>@</code>). */
public static final int ANYSTRING = 0x0008;



On Thu, Jan 21, 2021 at 9:21 PM Marcus Eagan <marcusea...@gmail.com> wrote:

> Hi All,
>
> In looking at the Java Docs, our Lucene team noticed that the `@` symbol
> is a reserved character in the Lucene regular expression syntax.
>
> In re-visiting the page in curiosity, I found that the symbol was
> [Optional] for "any string." This came at a surprise because there's a very
> common way to achieve "any string" in `.*`. Is there any compelling reason
> to preserve this tiny vector of complexity? I suspect there may be some
> differences in the constructions of the finite automata produced by `.*`
> and `@` but I am not sure.
>
> If insignificant or non-existent, I suggest we remove `@` from the regular
> expression syntax.
>
> --
> Marcus Eagan
>
>

-- 
http://www.needhamsoftware.com (work)
http://www.the111shift.com (play)

Reply via email to