Jump to content
You must now use your email address to sign in [click for more info] ×

Find/Replace trips up


Recommended Posts

When performing a Find and Replace operation, replacing one at a time, sometimes it seems like it gets tripped up or falls out of sequence. While working on a larger project, I found a bit of text where it always happens (for me), so I have reduced it down to a single page document with some reproducible steps, which I will demonstrate in the video below. Here are the steps to follow what I am doing:

  1. Start with the attached sample file
  2. With Find set to Regular Expression mode, use this as the search string:
    ^[A-Z0-9]+\.(\s|\t)+

     

  3. Leave the replace field empty

  4. Click Find once, then Replace multiple times

The result is that it removes the located string each time you click replace, until it gets to “VI. ” At that point it does remove the string, but it does not select the next matching string, which should be “A. ”. If you click Replace again, it then selects the following match, “B. ”, skipping the previous string. However, if you click Find again without changing anything, you can then go back to the skipped string, and it matches and replaces as expected.

 

 

regex_trip_up.afpub

Edit: Reporting from Publisher 1.7.2 release on macOS 10.14.6

 

 

Link to comment
Share on other sites

29 minutes ago, garrettm30 said:

replacing one at a time, sometimes it seems like it gets tripped up or falls out of sequence

It happens too on Windows. Usually I test to replace few occurences, clicking on the results listed in the panel, and if I click "replace all", the replacements are wrong. (At the moment, I thought it was more my error than a bug, but it could be improve or prevent pehaps?).

I didn't kept the file but started from scratch, without keeping the step by step in mind.

Link to comment
Share on other sites

Thanks for the feedback.

1 minute ago, Wosven said:

if I click "replace all", the replacements are wrong

That’s a more serious side effect than the mere annoyance as I reported it. If it happens in a Replace All operation, and the user is unaware that it happened, then text corruption has just occurred.

Link to comment
Share on other sites

I suppose I clicked on different results in the list, not following the order of those results. If I have time, I'll test again this week-end.

It just happened that few queries later, I realized all the text was a mess, and the querie was someting like replace " ([;:!?»])" by "~s$1". (sorry for "~s", not being able to write or read regular expressions because there's no text equivalent is a pain, like needing to click on a button for entering a small width non-breaking space => this means that if there's no equivalents, it'll be difficult to script when scripts are available).

Link to comment
Share on other sites

  • Staff

It seems to replace those individual entries fine if you select after performing the search, but if you replace continually and go through the list it skips them.

I can't see any obvious reason as to why this is happening. I've logged it, thanks for the clear recipe and file to demonstrate it

Serif Europe Ltd. - www.serif.com

Link to comment
Share on other sites

  • 2 months later...
  • Staff

Agreed, this issue was addressed in 1.8.0.499, thanks for confirming.

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.