Bug 163012 - [Request] Add an explanation of "\w" to the help page of the regular expression list
Summary: [Request] Add an explanation of "\w" to the help page of the regular expressi...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:25.2.0
Keywords:
Depends on:
Blocks: 38261
  Show dependency treegraph
 
Reported: 2024-09-17 15:11 UTC by nobu
Modified: 2024-09-20 03:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2024-09-17 15:11:26 UTC
Description:
Add an explanation of "\w" and "\W" to the help page of the regular expression list.

Steps to Reproduce:
1. Read Tip of the Day 63/225.
2. Want to find words containing 10 or more characters?
   Regular expression is " \w{10,} ".
   https://git.libreoffice.org/core/+/master/cui/inc/tipoftheday.hrc#118

3. Open Help page of "List of Regular Expressions".
   https://help.libreoffice.org/25.2/en-US/text/shared/01/02100001.html


Actual Results:
4. There is no explanation for the regular expression "\w".
   To know the meaning of its regular expression, you need to click the "ICU Regular Expressions Documentation" link.

Expected Results:
4. There is explanation for the regular expression "\w".


Reproducible: Always


User Profile Reset: No

Additional Info:
The regular expressions introduced in Tips should be explained in LibreOffice help.
Comment 1 Mike Kaganski 2024-09-17 18:01:18 UTC
The help page starts with:

> For a full list of supported metacharacters and syntax, see

every single metacharacter from that list could be a candidate for the inclusion to our help - except that the help page only mentions some part, and leaves the rest to the official library documentation.

However, it could be a problem, that that page is not localized...
Comment 2 Commit Notification 2024-09-17 18:19:47 UTC
Olivier Hallot committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/help/commit/74180ce0f912f7a432f509b8c5ac9239e4f74d9a

tdf#163012 Add description of \w and \W to regex page
Comment 3 fpy 2024-09-18 08:55:29 UTC
(In reply to nobu from comment #0)
> Description:
> Add an explanation of "\w" and "\W" to the help page of the regular
> expression list.

...

> 4. There is explanation for the regular expression "\w".

either change the title or the expected ;)

anyhow, \w  is mentionned in 2nd example of https://help.libreoffice.org/25.2/en-US/text/swriter/guide/search_regexp.html
-- which, to me, would be the main help entry point for regex.

As mentionned in tdf#113975, "List of Regular Expressions" (text/shared/01/02100001)  should focus on actual LO (gory) details, limitations, workarounds ...

and the general reference deferred to ICU list.


Now would make sense to curb this bugzilla to address all together the 2 other ToD related to regex : 

    "Find all expressions in brackets per Edit ▸ Find and Replace ▸ Find ▸ \\([^)]+\\) (check “Regular expressions”)"), "", "", swriter},

   "Want to remove all <> at once and keep the text inside? Edit ▸ Find and Replace: Search = [<>], Replace = blank and check “Regular expressions” under Other options."), "https://help.libreoffice.org/%PRODUCTVERSION/%LANGUAGENAME/text/shared/01/02100001.html", "", soffice}, //local help missing
Comment 4 nobu 2024-09-20 03:09:23 UTC
I agree.
"\D" and "\S" are not on the list.
I mistakenly thought that the opposite regular expression was always in the list.
According to that rule, you do not need to add "\W".

This is a request, not a bug, so it's correct to edit the title.

Other comments could not be understood by automatic translation.