Bug 156284 - Regex find letter \l does not work
Summary: Regex find letter \l does not work
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: Find&Replace-Regex
  Show dependency treegraph
Reported: 2023-07-14 09:56 UTC by Timur
Modified: 2023-07-14 11:51 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2023-07-14 09:56:46 UTC
In Find and Replace dialog \l with regex should mean 'find any letter', it does not work but finds just literal l. 
Seen Writer, Calc, OO and LO 24.2.

Workaround: use [a-zA-Z]
Comment 1 Eike Rathke 2023-07-14 10:53:33 UTC
\l should not "find any letter", in fact \l isn't assigned any special metacharacter meaning, see https://unicode-org.github.io/icu/userguide/strings/regexp.html#regular-expression-metacharacters

Any letter (not just ASCII) would be one of [\p{L}] or [\p{Letter}] or [\p{General_Category=Letter}]
See https://unicode-org.github.io/icu/userguide/strings/regexp.html#set-expressions-character-classes

Help doesn't mention such \l thing either, https://help.libreoffice.org/7.5/en-GB/text/shared/01/02100001.html

Also POSIX Basic or Extended Regular Expressions don't know \l nor any of the other regex dialects I know, so I don't know where you got that, but it's a wrong expectation.
Comment 2 Timur 2023-07-14 11:05:36 UTC
Thanks Eike.
I saw \l in Alternative Search extension for Writer and it seemed so logical that I did not check more.
Comment 3 Eike Rathke 2023-07-14 11:51:40 UTC
For the records, that seems to be this https://extensions.libreoffice.org/en/extensions/show/alternative-dialog-find-replace-for-writer