walt.farrell Posted February 7, 2023 Share Posted February 7, 2023 16 minutes ago, lacerto said: RegEx Buddy explanation for search and replace clauses helps to figure out the syntax -- though as mentioned, I might have misunderstood the goal: First, as far as I can tell, RegexBuddy does not enable the conditional replacement for Boost. At least I was never able to get it to work. Second, your replacement used (?1\1 and then some more, but the OP does not want to include what matched in capture group 1. They just want the <nnbsp>, not \1<nnbsp> as I understand it. 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...
lacerto Posted February 7, 2023 Share Posted February 7, 2023 19 minutes ago, walt.farrell said: First, as far as I can tell, RegexBuddy does not enable the conditional replacement for Boost. At least I was never able to get it to work. As the screenshot shows, you need to select extended mode from the options at the top toolbar. The highlighting shows that it works. 19 minutes ago, walt.farrell said: Second, your replacement used (?1\1 and then some more I could not make it work without. The first part ?1 indicates the search group (the left hand side of the search criteria as a whole), and \1 the first inner group, at the moment just left guillemot. It could be expanded with or clauses similarly as the replacement part. Quote Link to comment Share on other sites More sharing options...
laurent32 Posted February 7, 2023 Share Posted February 7, 2023 48 minutes ago, laurent32 said: Is this possible? Is it possible to insert a unicode value into Regex formulas such as \u+202f, or to indicate a variable such as <nnbsp> that appears in the occurrence display? Or, is it necessary to paste a narrow non-breaking space <nnbsp> (obtained by U+202F from the text)? I tried it, yes you can input a unicode U+202F to have the <nnbsp> in the formula. Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
laurent32 Posted February 7, 2023 Share Posted February 7, 2023 43 minutes ago, lacerto said: Here is my take, but I may have understood incorrectly OP's intentions: RegEx Buddy explanation for search and replace clauses helps to figure out the syntax -- though as mentioned, I might have misunderstood the goal: In Notepad++: Note: I have only InDesign CS6 and QXP2018 at the moment and neither supports extended boost expressions like conditional replacements. I have no idea if the later versions do. But having scripting support (and ability to chain regex searches in case multiple simple find & replace operations are not wanted to be used), or even just an ability to save regex searches naturally makes need for such advanced searches less necessary. EDIT: <nnbsp> is here simply just a placeholder. If it is used literatlly, it needs to be find + replaced using the actual thin space that the client app understands. That's great @lacerto, you understood correctly, RegexBuddy looks neat. I tried with search : («)\s|\s(»|:|!|\?|%) And replace : ?1\1<nnbsp>:<nnbsp>\2 *with <nnbsp> = u+202F ; entered manually using : But like @walt.farrell said, it doens't work in Publisher 2… 22 hours ago, walt.farrell said: Therefore, it is most likely that Publisher does not enable this formatting option when issuing the regex_replace call to process the replacement string. Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
lacerto Posted February 7, 2023 Share Posted February 7, 2023 5 minutes ago, laurent32 said: But like @walt.farrell said, it doens't work in Publisher 2… No, it does not. Version number is high enough but there is no support for extended boost, at least in replacements. Very few apps support it, e.g. I tried to make it work in Visual Studio Code, but no luck. Perhaps with an extra plugin. RegEx Buddy lets test with any of its supported syntaxes whether such conditionals can be converted to another "dialect" but I have not found anything useful so far. laurent32 1 Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted February 7, 2023 Share Posted February 7, 2023 57 minutes ago, lacerto said: Very few apps support it, For Boost (which Publisher uses), the call to the regex_replace function must specify an additional option to request the extended functionality. Publisher apparently doesn't include that option. laurent32 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...
walt.farrell Posted February 7, 2023 Share Posted February 7, 2023 2 hours ago, lacerto said: As the screenshot shows, you need to select extended mode from the options at the top toolbar. The highlighting shows that it works. Sorry, but my copy of RegexBuddy doesn't work that way. I'm using a newer copy than you, I think, as it uses Boost::regex 1.78-1.80, where your copy's version ends at 1.77. But the explain window shows it inserting literal text, not performing the conditional replacement: And adding the \1 like you used doesn't help. 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...
lacerto Posted February 7, 2023 Share Posted February 7, 2023 7 hours ago, walt.farrell said: Sorry, but my copy of RegexBuddy doesn't work that way. I'm using a newer copy than you, I think, as it uses Boost::regex 1.78-1.80, where your copy's version ends at 1.77. I have the latest version 4.14. I hade chosen an ealier boost version as i assumed (possibly wrongly) that Affinity apps use an earlier version. Here is another example with the latest boost version supported by RegexBuddy and conditional find + replace seems to work fine: I guess the explanation could be better but I do not master RegEx well enough to be able to judge: Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted February 7, 2023 Share Posted February 7, 2023 Thanks, @lacerto. I looked, and you had selected one extra option I had not chosen, the "All flavor". I missed that originally. In fact, that setting is all that's needed. The Extended flavor (first box) is not necessary. 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...
laurent32 Posted February 7, 2023 Share Posted February 7, 2023 RegexBuddy looks like a tenor, is there an equivalent app for macOS ? Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
walt.farrell Posted February 7, 2023 Share Posted February 7, 2023 28 minutes ago, laurent32 said: RegexBuddy looks like a tenor, is there an equivalent app for macOS ? https://alternativeto.net/software/regexbuddy/?platform=mac (I have no experience with any of them.) 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...
Pyanepsion Posted February 7, 2023 Author Share Posted February 7, 2023 6 hours ago, lacerto said: These kinds of changes could easily be applied in a text editor like Word or LibreOffice Writer using macros, before importing text. It is not a very good idea to take text directly from Word or worse from Write. A text editor is too limited compared to a DTP program and therefore gives a poor assessment of the work to be done. It also contains errors that will be difficult to detect during DTP and will therefore waste a lot of time. It is generally better to use a a word processor as a draft and then run the whole text through a text editor to eliminate artefacts. That said, good DTP will often alter the text slightly, to make it longer, shorter, or just better. Having a tool that does all the necessary replacements in one process will save a lot of time. 5 hours ago, laurent32 said: We don’t have <nnbsp> in the pull down, we only have access to <nbsp> To use the ‘Narrow no-break space’ character (U+202F) in Affinity Publisher, follow these steps: Write ‘U+202F’ in the frame text. Select ‘U+202F’. Press the ‘Alt +U’ (Windows) or ‘Cmd +U’ (Mac) keys to transform it into a ‘Narrow no-break space’ character. Copy the resulting character. Paste the character into your formula. It would be much better to be able to select <nnbsp> directly in Affinity’s Regex routines, and even better to be able to enter Unicode codes. Quote 6 cœurs, 12 processus - Windows 11 pro - 4K - DirectX 12 - Suite universelle Affinity (Affinity Publisher, Affinity Designer, Affinity Photo). ███ Mais je vous le demande, peut-on imaginer une police sans sérifs ? Link to comment Share on other sites More sharing options...
lacerto Posted February 7, 2023 Share Posted February 7, 2023 1 hour ago, walt.farrell said: In fact, that setting is all that's needed. The Extended flavor (first box) is not necessary. I do not know the difference of flavors but it was clear that defaults were not enough to cover conditional find replace (disregarding boost version number). Conditional find replace examples could be found under "boost extended" documentation so I tried that with "All flavors", which helped me to get started. walt.farrell 1 Quote Link to comment Share on other sites More sharing options...
walt.farrell Posted February 7, 2023 Share Posted February 7, 2023 28 minutes ago, lacerto said: so I tried that with "All flavors" In case it helps with understanding: that is not "All flavors" but "All flavor". And it should be interpreted as "Choose the All flavor of replacement processing" (vs. some other flavor of replacement processing.). That is, it specifies the options ("flavor") used for the replace call. And to use conditional replacement with Boost, you need the format_all option specified = "All" flavor. 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...
lacerto Posted February 7, 2023 Share Posted February 7, 2023 4 hours ago, walt.farrell said: you need the format_all option specified = "All" flavor. Thanks for the clarification. Yes, quite concise and cryptic even if it at times resembles natural language! I have so far managed to deal with RegEx just copy pasting bits on on-demand basis from forums like InDesign Secrets and saved a couple of dozens most useful, but got interested enough because of this forum to try to educate myself with RegexBuddy. But I have noticed that to really understand it, more fundamental learning is needed. I have Jeffrey E. F. Friedl's and Peter Kahrel's books so I guess I have everything that is needed -- except for another life! But as long as scripting is not available in Affinity apps, I suppose my RegEx skill level will improve from elementary to basic. Alternative groups with conditional Find + Replace might become quite handy once I find a programming / scripting context that fully supports the feature (too novel to ever having become introduced in the mentioned books) so thanks for bringing it up on the forum! Quote Link to comment Share on other sites More sharing options...
laurent32 Posted February 8, 2023 Share Posted February 8, 2023 13 hours ago, Pyanepsion said: To use the ‘Narrow no-break space’ character (U+202F) in Affinity Publisher, follow these steps I think you can go faster with : And then you type 2 times the return key. @MikeTO taught me that way of doing. But it's on macOS… Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
Pyanepsion Posted February 8, 2023 Author Share Posted February 8, 2023 Note: 22 hours ago, walt.farrell said: Find: (\s(?=(:|»|%)))|(«)\s Replace: (?1<nnbsp>:\2<nnbsp>) With the sentence: Il lui dit : « je sais. C’est 15 %. ». The result is incorrect because the ‘«‘ character has been deleted. This gives: Il lui dit<nnbsp>: <nnbsp>je sais. C’est 15<nnbsp>%.<nnbsp>». 21 hours ago, Andreas CH said: Find: (\s(?=(:|»|%)))|(?<=«)\s Replace: (?1<nnbsp>:\2<nnbsp>) The result is correct: Il lui dit<nnbsp>: «<nnbsp>je sais. C’est 15<nnbsp>%.<nnbsp>». Explanations: These two examples are interesting because they help to understand the difference between (»)\s and (»?<=)\s. The error in the first replacement formula lies in the use of the positive lookbehind condition (?<=")\s. This condition looks for a white space preceded by a ‘«‘ character. If this condition is true, the white space will be replaced by <nnbsp>. "Positive lookbehind" is a term that describes a technique used in regular expressions to look for a match that immediately precedes the current position in the string without consuming those characters in the match. In other words, it checks whether a certain pattern exists immediately before the current position in the text, but without including that pattern in the match. However, in the first formula, there is a syntactic error that makes the lookbehind condition invalid. It lacks a ‘?‘ to specify that the condition is a positive lookbehind. The condition must therefore be (?<=")to be valid. The absence of a ‘?‘ means that the condition is not a positive lookbehind and has no effect on the string. Therefore, the ‘«‘ character is not found and is not included in the final result, causing the character to be deleted. Quote 6 cœurs, 12 processus - Windows 11 pro - 4K - DirectX 12 - Suite universelle Affinity (Affinity Publisher, Affinity Designer, Affinity Photo). ███ Mais je vous le demande, peut-on imaginer une police sans sérifs ? Link to comment Share on other sites More sharing options...
walt.farrell Posted February 8, 2023 Share Posted February 8, 2023 1 hour ago, Pyanepsion said: However, in the first formula, there is a syntactic error that makes the lookbehind condition invalid. It lacks a ‘?‘ to specify that the condition is a positive lookbehind. The condition must therefore be (?<=")to be valid. No, it's a different mistake. The first one is not using a lookbehind expression at all. It is attempting to simply match the « and include it in the output. But (I think) the \2 in the replacement is incorrect. Try this instead: 1 hour ago, Pyanepsion said: Find: (\s(?=(:|»|%)))|(«)\s Replace: (?1<nnbsp>:\3<nnbsp>) In combining the two parts of the search regex, I think the first part got an extra capture group that it didn't have in the original. Thus the combined version had an empty group #2 when the second part matched. So we need \3 rather than \2, I think. 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...
laurent32 Posted February 8, 2023 Share Posted February 8, 2023 Are you OK with the meaning of (?=exp) and (?<=exp) ? Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
laurent32 Posted February 8, 2023 Share Posted February 8, 2023 Returning to the very first post… Seach = \s(?=(:|»|%))|(?<=«)\s Replace = <nnbsp> (entered as a unicode u+202F) isn't it the solution ? Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
laurent32 Posted February 8, 2023 Share Posted February 8, 2023 Well… In a little app I 've got : But when I try in publisher 2 : is just an example… I get = So I don't understand ????? EDIT : I got the above once but I could not reproduce it again… ??? Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
walt.farrell Posted February 8, 2023 Share Posted February 8, 2023 8 minutes ago, laurent32 said: But when I try in publisher 2 : Why are your \ characters highlighted that way? That normally means it's a special character you inserted via the pulldown list. Does it work if you just type a \ instead? 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...
laurent32 Posted February 8, 2023 Share Posted February 8, 2023 I did nothing special to have those "blue" signs, I just copied and pasted plain text… I thought it was because I'm on Mac ? But noooooooooo, I guess there is a bug hiding there !!! Because BINGO : I changed it inside publisher 2 : And for the great part I got : Amazing, it worked at last !!!!!!! What are those "blue" \ ????? Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
laurent32 Posted February 8, 2023 Share Posted February 8, 2023 The story has not ended… After I run the search and replace without the "blue" \ => they come back !! And if I cmd-Z and run the search and replace with those "blue" \ , this time all is correct… Summary : if I copy and paste the search formula from plain text, I get the "blue" \ and the s & r is not working… if I change the "blue" \ to "normal" \ , the s & r works fine… Clicking elsewhere and coming back to s&r the "normal" \ become "blue" \ again… (and the formula is still working from now on) Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 Link to comment Share on other sites More sharing options...
laurent32 Posted February 8, 2023 Share Posted February 8, 2023 Well well well, I tried it all again ; and with or without the "blue" \ (I guess it's normal with affinity over macOS) I get the regex to work fine : Returning to the very first post… Seach = \s(?=(:|»|%))|(?<=«)\s Replace = <nnbsp> (entered as a unicode u+202F) Is the solution. Now we'd have to tuneup that formula to take care of : ; : " «» ? ! % etc… walt.farrell and lacerto 2 Quote MacBook Pro 16 pouces (3456 × 2234), 2021 / Apple M1 Pro / 16 Go / macOS Ventura Version 13.4.1 (22F82) + 31,5 pouces (2560 × 1440) + 27 pouces (1080 × 1920) + iPad (8th generation) / iPadOS 17.2 + Apple Pencil + … Macmini6,2 Quad-Core Intel Core i7 16 Go / macOS Catalina version 10.15.7 (19H2026) MacBookAir6,2 Intel Core i5 double cœur 4 Go / macOS Big Sur version 11.7.7 (20G1345) Licence Universelle Affinity V2 updated to 2.3.0 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.