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

3 BUGS : Regex Search and Replace Skipping, RegEx Publisher Crash


timotejs

Recommended Posts

 

Regex Search and Replace Skipping occurrences randomly :/

Best illustrated by attached Video. I have seen Publisher also randomly crashing when working with regex Search and Replace. Hopefully you can find the problem as it is essential feature for me as I often have to edit huge texts where this kind of 'automation' is necessary.

Thanks for help/solution.

 

EDIT: I just found how to crash Publisher when working with RegEx in reproducible way. See the second video attached with name "ReproducibleCrash.flv". If I repeat steps in that video Publisher will crash every time.:61_sob:

And EDIT2: Bug when using Replace All instead of replacing one by one. This way somehow Chapter 2 gets duplicated. As input i have Chapters 1 - 19. But after using regex replace I endup with = [Chapter 1, Chapter 2, Chapter 2, Chapter 3-18]. As always I am attaching video to show the problem which is also reproducible.

Link to comment
Share on other sites

It would also be helpful if you would attach the .afpub file.

If it's sensitive then one of the moderators can provide a private upload link.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Yep basically I have 3 kinds of situations when working with such regex replacements:

1. skipping some occurences

2. affinity publisher crashing

3. maybe worst of all (because it is silent failure) duplicating some occurences. Example:

<chapter>Chapter 1</chapter>
<chapter>Chapter 2</chapter>
<chapter>Chapter 3</chapter>
<chapter>Chapter 4</chapter>
<chapter>Chapter 5</chapter>

becoming (after using Replace All button):

Chapter 1
Chapter 2
Chapter 2
Chapter 3
Chapter 4

This is even more dangerous for me as it can be easy to miss mistake if you are running the regex on longer texts.

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.