On 17/10/2018 17:11, Richard Kimberly Heck wrote:
On 10/16/18 7:20 AM, Daniel wrote:
On 15/10/2018 22:42, Richard Kimberly Heck wrote:
On 10/15/18 3:13 PM, José Abílio Matos wrote:
On Monday, 15 October 2018 07.31.20 WEST Daniel wrote:
Currently, the list is filtered such that any occurrence of the typed
characters in that order but not necessarily successively is
matched. I
think this is a bit too "lenient".
I think that the correct word here is "weird". :-)

Now I understand why I am always confused when using the filter. :-)

Note to self (or anyone else who wants to deal with this): It's
charFilterRegExp that does the black magic here.

Thanks. I can't test this at the moment but it seems that one needs to
get rid of the .*'s in the function. These match any characters.
Leaving these out one will match the expression in order.

The more narrow version, to match only from the beginning of a word
boundary, is achieved by adding \b in front of the whole, e.g.

return "\\b" + re;

Finally, and even more narrow:

return "^" + re;

will match only from the beginning of the string.

Two more things:

- The matched characters are underlined in LyX. I am not sure whether
the black magic of charFilterRegExp is sufficient for this or whether
one needs to amend the code elsewhere.

- There is a twin function, charFilterRegExpCC, I don't know whether
it needs to be changed as well or what it does.


I've fixed all this in master. It'll go to 2.3.3, if all is well.

Riki

Thanks! I am looking forward to what filter you opted for.

Daniel

Reply via email to