To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=110755
                 Issue #|110755
                 Summary|Unable to Find & Replace Regular Expression $ with \t 
                        |Tab
               Component|Word processor
                 Version|OOo 3.2
                Platform|PC
                     URL|
              OS/Version|Windows Vista
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|editing
             Assigned to|writerneedsconfirm
             Reported by|ppww





------- Additional comments from p...@openoffice.org Fri Apr  9 22:50:38 +0000 
2010 -------
I'd like to append a tab, followed by additional text (the digit 1), to the end
of each line of a selection.  In the Find & Replace dialog, I enter

Search for: $
Replace with: \t1\n
(Regular expressions checkbox selected)

But this appends a literal "\t1" to the end of each line, instead of the tab
character.  Same with \x0009, which inserts those literal characters instead of
the tab control character.

Workaround:
Search for: (.*)$
Replace with: $1\t1

A few more possible bugs are evident when using the workaround:

The back-reference \1 does not work, it must be $1.

The expression does not find blank lines, even though the any-character (.) is
optional (*).

And in the workaround case, it is not necessary to include \n in the
replacement, as the newline is not removed by the search expression.  (The
newline is removed if only $ is specified as the search.  Inconsistent 
behavior.)

My reference is
http://wiki.services.openoffice.org/wiki/Documentation/How_Tos/Regular_Expressions_in_Writer#The_.27Replace_with.27_box_.5Ct_.5Cn_.26_.241_.242
which indicates that \t, \x0009 and \1 etc. are supposed to work in replacement
expressions.  \t does work as a replacement in cases other than a single $
search, but \x and \1 seem never to work as described.  \n in the replacement
works as expected in all cases that I've tried.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@sw.openoffice.org
For additional commands, e-mail: issues-h...@sw.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to