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

Possible Find & Replace Bug

Expand Messages
  • Art Kocsis
    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:
    Message 1 of 1 , Jun 2, 2012
    • 0 Attachment
      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
      text.

      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
      could
      just be replaced. It appears that the Replace All command restarts the search
      process beginning in the selected text.

      Art
    Your message has been successfully submitted and would be delivered to recipients shortly.