Loading ...
Sorry, an error occurred while loading the content.

22582Possible Find & Replace Bug

Expand Messages
  • Art Kocsis
    Jun 2 3:07 AM
      I think this is a NoteTab bug rather than a RegEx bug.
      The behavior is identical in both Std and Pro.

      Search String: ^H\=\"(.+?)\"\R\K(.+?)\R
      Replace string: Name: $1\r\nDesc: $2\r\n

      Target Text:

      H="Name 1"
      Description 1

      H="Name 2"
      Description 2

      H="Name 3"
      Description 3

      As I do frequently to verify the F&R, I first click on the Find Next and
      then click on
      Replace a few time. If everything checks out I click on Replace All to
      finish the rest.

      However, after a FInd Next, a click Replace All results in the message:
      No replacements of "^H\=\"(.+?)\"\R\K(.+?)\R" were made within the selected

      The problem seems to be due to the \K in the search pattern. Remove it and the
      process works as expected. Or Click the Replace all with nothing selected
      and it
      works OK.

      Obviously, the pattern cannot match in the selected text as the first part
      has been
      discarded but the desired pattern has already been matched and selected and
      just be replaced. It appears that the Replace All command restarts the search
      process beginning in the selected text.