Page 1 of 1

Replacing with a newline ignores Selected Text setting. Bug?

Posted: Tue Jun 19, 2007 11:33 am
by A bit iffy
I wanted to put a newline after each comma within just the first pair of parentheses of the following:

Code: Select all

INSERT INTO SourceDocumentClauses (SourceClauseId, SourceDocumentId, SourceClauseReference, SourceClauseDescription, SourceClauseText, FunctionalGroupId, AssociatedTwiClause, SortNumber, CreatedTimestamp, CreatedBy, LastModifiedTimestamp, LastModifiedBy) VALUES (76, 1, 'xdf435w', 'dsrgs5', 'stuff', , 'U', '1.444', '19/06/2007 11:52:43', 'Supervisor', '19/06/2007 11:52:43', 'Supervisor')
Thus I selected the text within just the first pair of parentheses, and in the Replace dialog I put , into the "Find what" field, ,\n into the "Replace with", chose Regular expression and Selected text and clicked Replace All.

What I expected was the following:

Code: Select all

INSERT INTO SourceDocumentClauses (SourceClauseId,
 SourceDocumentId,
 SourceClauseReference,
 SourceClauseDescription,
 SourceClauseText,
 FunctionalGroupId,
 AssociatedTwiClause,
 SortNumber,
 CreatedTimestamp,
 CreatedBy,
 LastModifiedTimestamp,
 LastModifiedBy) VALUES (76, 1, 'xdf435w', 'dsrgs5', 'stuff', , 'U', '1.444', '19/06/2007 11:52:43', 'Supervisor', '19/06/2007 11:52:43', 'Supervisor')
However, what I actually got was this:

Code: Select all

INSERT INTO SourceDocumentClauses (SourceClauseId,
 SourceDocumentId,
 SourceClauseReference,
 SourceClauseDescription,
 SourceClauseText,
 FunctionalGroupId,
 AssociatedTwiClause,
 SortNumber,
 CreatedTimestamp,
 CreatedBy,
 LastModifiedTimestamp,
 LastModifiedBy) VALUES (76,
 1,
 'xdf435w',
 'dsrgs5',
 'stuff',
 ,
 'U',
 '1.444',
 '19/06/2007 11:52:43',
 'Supervisor',
 '19/06/2007 11:52:43',
 'Supervisor')
So it seems that if you have a newline in the "Replace with", the "Selected text" option is ignored. Is this a bug?

I'm using 5.0.3 on Win2K (SP4).

Posted: Tue Jun 19, 2007 12:36 pm
by ben_josephs
Agreed, approximately. It seems to extend the selection to the end of the line. Looks like a bug to me.

Posted: Tue Jun 19, 2007 2:50 pm
by bbadmin
Confirmed as a bug. Thanks for reporting it.