Timeline for Indesign GREP: Negative lookbehind with variable length
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 17, 2021 at 7:31 | vote | accept | SabineR | ||
Jun 16, 2021 at 19:18 | comment | added | Wolff | Let us continue this discussion in chat. | |
Jun 16, 2021 at 19:18 | history | edited | Wolff | CC BY-SA 4.0 |
Updated GREP and added tips to further automatization
|
Jun 16, 2021 at 15:15 | comment | added | Wolff | You need to delete the swatch again in the script after performing the grep searches. So the script cleans up after itself. Also need to use an obscure name which you are certain you will never use in a document. | |
Jun 16, 2021 at 15:07 | comment | added | SabineR | Thanks, I'm still trying to figure out how. I managed to add a color but still need to figure out how to not make it fail if the color name already exists (if the script is used a second time it fails.) Sadly my scripting knowledge ist barely existend. What does work for me though, is to use an existing color we already have in our templates and use the GREP for the URL again to switch it to black again. But I still want to find out how to do it your way. | |
Jun 16, 2021 at 13:24 | comment | added | Wolff |
Ah, you can create the swatch in the .jsx file with some name, then refer to that name in the .txt and afterwards delete it again. I might add this to the answer later.
|
|
Jun 16, 2021 at 13:13 | comment | added | SabineR | I managed it to work, for some reason I wrote "Black" in small letters so that was the problem. Thank you. I put in everything you wrote and it works wonderfully. (I used (http(s)?://[^ ]+(?=\r))|(http(s)?://[^ ]+(?= )) to include the URLs at the end of a paragraph.) Now I need to find a way to create this temporary color without needing to resort to do it manually. | |
Jun 16, 2021 at 12:38 | comment | added | Wolff | I was fearing you might get trouble with that 😀. And you have of course tried both "schwarz" and "Schwarz"? But yes, you could do it within the jsx and thereby eliminating the need for the custom swatch I think. It's just way more complicated to explain. But that wouldn't solve the problem with not being able to search only within [Black] text, would it? You have to find out how to select it in the German version. | |
Jun 16, 2021 at 10:50 | comment | added | SabineR | That sounds promising but apart from some minor differences which I might be able to solve, i can't seem the grab the standard [black] (which is [schwarz] in my indesign). It works with any other new color but not with the standard one. Is there a way to grap that? Is it also possible to create the temp url color via the txt or maybe by editing the jsx? | |
Jun 15, 2021 at 19:26 | history | answered | Wolff | CC BY-SA 4.0 |