Problem with standard regex
kornel at lyx.org
Wed Jan 6 14:29:00 UTC 2021
Am Wed, 6 Jan 2021 11:36:43 +0200
schrieb Yuriy Skalko <yuriy.skalko at gmail.com>:
> >> > BTW, I tested the regexes with Russian documents, and found an error in
> >> > Additional.lyx
> >> > Correction attached.
> >> Really, that was missed out. Please commit it.
> > Done at c6bc5f0c
> >> I've tested the regexes (with and without format). Now there are no
> >> problems with Cyrillic in any practical regexes I can think of. Thanks
> >> for advsearch that is really usable now, Kornel!
> > Tried some exotic ways?
> > 1.) Search for 3 or more consecutive identical chars
> > '(\S)\1\1+'
> > 2.) Repeated words
> > '\b(\w+)\s+\1\b'
> > # You will find 'действительно действительно', 'после после' in Additional.lyx
> > 3.) Different languages (e.g.Latin) (Wrap the whole expression into Latin env
> > '.+'
> > etc
> > Kornel
> Of course I've not tried such regexps. These are interesting and really
Yes, people often underestimate the usefulness of regex :)
It would even be better if std::regex would allow lookbehind and lookahead.
But that is only with Qt possible, so I have not tested.
> I've done search for repeated words in LyX manuals and fixed a few.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
More information about the lyx-devel