[Libreoffice-bugs] [Bug 132870] New: BASIC-Editor: Matching start-of-line using a lone ^ does not work

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat May 9 10:07:02 UTC 2020


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

            Bug ID: 132870
           Summary: BASIC-Editor: Matching start-of-line using a lone ^
                    does not work
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: andreas.heinisch at yahoo.de

Description:
Matching start-of-line using a lone ^ does not work, or not correctly.  It
seems impossible to prepend anything to a group of lines, for example, to make
them into a block comment by prepending "'  " in Basic code.

Maybe now that someone who knows how Find & Replace works is here, this can be
looked at.

The problem is that ^ by itself does not match unless the line contains
something after the start-of-line position (i.e. it is not completely empty).

1. Open the ReplaceBug.ods demo and navigate to the Basic code as described in
the original comment.

2. Select lines 3-5, i.e., the empty sub declaration ("Sub Main", the empty
line, and "End Sub")

3. Control-H.
   Check "Regular expressions" 
   Set Find: to the single character ^  (should match starts of lines)
   Set Replace: to the character '  (the Basic comment-starter char)
   Click Replace All

RESULTS: The apostrophie is prepended to only the non-empty lines.
EXPECTED RESULTS: Should be prepended to every line.

Actual Results:


Expected Results:



Reproducible: Always


User Profile Reset: No



Additional Info:

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200509/173f42ba/attachment.htm>


More information about the Libreoffice-bugs mailing list