timotejs Posted September 8, 2019 Share Posted September 8, 2019 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. 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. 2019-09-08 16-57-09.flv ReproducibleCrash.flv BUG3.flv Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted September 8, 2019 Share Posted September 8, 2019 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. Quote -- 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 More sharing options...
timotejs Posted September 8, 2019 Author Share Posted September 8, 2019 Hi, i just tried to reproduce the issues on completely new file. Just create 2 column master and paste the same text in. I am able to reproduce the issue 3 and 1. So it doesn't seem to be related to the file I am opening. Quote Link to comment Share on other sites More sharing options...
lacerto Posted September 8, 2019 Share Posted September 8, 2019 (...) Quote Link to comment Share on other sites More sharing options...
timotejs Posted September 9, 2019 Author Share Posted September 9, 2019 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. Quote Link to comment Share on other sites More sharing options...
lacerto Posted September 9, 2019 Share Posted September 9, 2019 (...) Quote Link to comment Share on other sites More sharing options...
Staff Jon P Posted September 9, 2019 Staff Share Posted September 9, 2019 @Lagarto Thanks for that file and example, I've reproduced the hang and logged it. We already have an issue in where it can "skip" occurrences with RegEx, so hopefully this covers what you have seen regarding the skips Quote Serif Europe Ltd. - www.serif.com Link to comment Share on other sites More sharing options...
Recommended Posts
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.