Nin Posted April 25, 2022 Share Posted April 25, 2022 (edited) Hi everyone! I'm looking for input, and I hope you can help me. I must split a lengthy document into chapters, and every chapter must start on an odd page break. The author wrote as one long text, flowing from frame to frame. They started the new chapter at the top of the page as 'CHAPTER xx.' Here is the regex code I wrote to Find And Replace in Affinity Publisher. Find: CHA(?=PTER) Replace: <Odd Page Break symbol>CHA NOTE: it is not case sensitive. Manual. I must select the correct 'chapter' from the found list and click replace. I'm having a difficult time creating a pattern code where the replace knows to add the odd page break at the space in front of the word Chapter. Note: sometimes the author used complete uppercase, sometimes it is the first letter uppercase. How would you approach this problem? I'm on macOS Monterey Version 12.3.1 and using Publisher 1.10.4. Any and all input is greatly appreciated! Edited April 25, 2022 by Nin Add in my systems I use. Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted April 25, 2022 Share Posted April 25, 2022 I'm not sure I understand the variants you're dealing with. All the hearings you showed just use CHAPTER. Things might be simpler if you restrict the hits to items that start a paragraph, e.g., Find ^CHAPTER 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...
Nin Posted April 25, 2022 Author Share Posted April 25, 2022 2 hours ago, walt.farrell said: I'm not sure I understand the variants you're dealing with. All the hearings you showed just use CHAPTER. Things might be simpler if you restrict the hits to items that start a paragraph, e.g., Find ^CHAPTER Oh, I feel very silly. That never occurred to me. Thanks Walt! Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted April 25, 2022 Share Posted April 25, 2022 You're welcome. If it's still not good enough, let us know what further problems you have and someone can probably help. Nin 1 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...
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.