[Bug 165725] Allow targeting of styles and formatting via regular expressions in Find and Replace

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Mar 14 05:52:51 UTC 2025


https://bugs.documentfoundation.org/show_bug.cgi?id=165725

Buovjaga <ilmari.lauhakangas at libreoffice.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Updated Find and Replace    |Allow targeting of styles
                   |                            |and formatting via regular
                   |                            |expressions in Find and
                   |                            |Replace
     Ever confirmed|1                           |0
             Status|NEEDINFO                    |UNCONFIRMED
                 CC|                            |libreoffice-ux-advise at lists
                   |                            |.freedesktop.org
           Keywords|                            |needsUXEval

--- Comment #3 from Buovjaga <ilmari.lauhakangas at libreoffice.org> ---
(In reply to Walter from comment #0)
> 2. Search for line in bold and its subsequent line and replace line 1 as
> Heading 1 and line 2 as Heading 2
> 3. Match Heading 1 text and prepend the text "Chapter " 

Both of these could basically be summed up as "allow targeting of styles and
formatting via regular expressions", which seems quite ambitious. It would mean
adding new non-standard regex syntax. I'll change the summary accordingly.

That said, the AltSearch extension already seems to offer what you want:
https://extensions.libreoffice.org/en/extensions/show/70066
https://macrojtb.hys.cz/HelpAltSearch_en.html

List box 'Properties'

This enables searching according to properties (attributes), and also according
to the values of these properties.
The search entry must begin with the string [:::, followed by a name of a
property (more than one name can be separated using the | sign) and must end
with the string ::]. After this can follow the specification of some search
text. If the value of the property is to be searched, the construction
name=value should be used.

[:::ParaStyleName::] - searches for paragraph style [v1.3.1]

[:::ParaStyleName=::] will find all whole paragraph with paragraph style
another than the Default style

[:::ParaStyleName=Example::] will find whole paragraph with paragraph style
Example

[:::ParaStyleName=Example::] something will find text something if it is
formatted through paragraph style Example

etc.

> 4. Help can be offered offered in building complex regular expressions by
> presenting a drop-down list with options of strings to match

I guess the design team can mull over this one as well and the potential
splitting of the report can be done after the decision.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Libreoffice-ux-advise mailing list