Bug 170491 - The explanation for "\s" and [:space:] in the list of regular expressions is unclear
Summary: The explanation for "\s" and [:space:] in the list of regular expressions is ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Documentation (show other bugs)
Version:
(earliest affected)
25.8.3.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find&Replace-Regex
  Show dependency treegraph
 
Reported: 2026-01-27 02:11 UTC by nobu
Modified: 2026-02-01 16:19 UTC (History)
5 users (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 2026-01-27 02:11:25 UTC
Description:
The explanation for "\s" and [:space:] in the list of regular expressions is unclear.

Steps to Reproduce:
1. Open "List of Regular Expressions". ( Current version is 25.8 )
  https://help.libreoffice.org/latest/en-US/text/shared/01/02100001.html

\s and [:space:] are
  Represents a space character (but not other whitespace characters).

2. Open "ICU page".
  ICU
  https://unicode-org.github.io/icu/userguide/strings/regexp.html#regular-expression-metacharacters
  \s is
  Match a white space character. White space is defined as [\t\n\f\r\p{Z}].

Others
Regular expression
https://en.wikipedia.org/wiki/Regular_expression

Whitespace
https://en.wikipedia.org/wiki/Whitespace_character

Actual Results:
3. It may not be wrong, but the explanation is difficult to understand.

Expected Results:
3. It would be good to reproduce a similar explanation as ICU's.
   Additionally, note that it may include tab characters and line breaks.


Reproducible: Always


User Profile Reset: No

Additional Info:

Sample Calc formula
Tab + Line break + Half-width space + Full-width space

=LEN(REGEX(CHAR(13) & CHAR(10) & " " & " ", "\s*"))  -> 4
=LEN(REGEX(CHAR(13) & CHAR(10) & " " & " ", "[:space:]*"))  -> 4
=LEN(REGEX(CHAR(13) & CHAR(10) & " " & " ", "[\t\n\f\r\p{Z}]*"))  -> 4
Comment 1 Werner Tietz 2026-01-27 15:27:03 UTC
(In reply to nobu from comment #0)
> Description:> Expected Results:
> 3. It would be good to reproduce a similar explanation as ICU's.
>    Additionally, note that it may include tab characters and line breaks…

…paragraph breaks and other **non visible chars** 


+1