Copy link to clipboard
Copied
Dear all,
I'm looking for a grep expression that will find any space that it's size is 10pt and that appears before any character that it's size is 14pt and will select it. I'm not very good in grep and will appreciate help with it.
Many thanks,
Shlomit
It's possible to search for a space-in-10pts that is "not followed by anything" (i.e., not followed by any text in 10 pt😞
\x{0020}(?!.)
with "10pt" in the Find Format field. (The notation "\x{0020}" is another notation for a simple single space, as that would be hard to see and easy to miss in this forum post.)
This will also find spaces (in 10 pt) at the end of sentences, footnotes, table cells, and stories, and spaces (in 10 pt) that are followed by any text in 10.01 pt, 11 pt, and any other siz
...Copy link to clipboard
Copied
grep works only with the contents of your text, not with the formatting.
so: you can search for an 'x' that comes before a 'u', but you cannot search for 'formatting a' that is followed by 'formatting b'.
AFAIC you'd need a script to find your spaces. To write such a script properly would take some time that I currently don't have, alas.
Copy link to clipboard
Copied
It's possible to search for a space-in-10pts that is "not followed by anything" (i.e., not followed by any text in 10 pt😞
\x{0020}(?!.)
with "10pt" in the Find Format field. (The notation "\x{0020}" is another notation for a simple single space, as that would be hard to see and easy to miss in this forum post.)
This will also find spaces (in 10 pt) at the end of sentences, footnotes, table cells, and stories, and spaces (in 10 pt) that are followed by any text in 10.01 pt, 11 pt, and any other size than 10 pt. So whether this will work "perfectly", "close enough", or "thank you but it does not work at all for me" depends solely and entirely on the contents and formatting of your text.
Copy link to clipboard
Copied
Dear Jongware
Thank you so much for your help.
I tried it and it works exactly as I wanted.
Just for the info of what happened:
I received an ID file that someone did all wrong in InDesign and I need to fix it. In between text of 14pt, there are smaller words of 10pt. They were originally (probably) marked as smaller text in Word (Office), but when you double click a word in Word it always select the following space. I believe this is what happened. These spaces should not have been defined smaller unless they exist between 10pt words.
I wonder if there is way to do the opposite, to find a 10pt space that comes after a 14pt word.
again, thank you for this help,
Shlomit
Copy link to clipboard
Copied
https://forums.adobe.com/people/Shlomit+Heymann wrote
… I wonder if there is way to do the opposite, to find a 10pt space that comes after a 14pt word.
That would be the same way, but then with a lookbehind instead of a lookahead:
(?<!.)\x{0020}
again with 10pt in the Find format. Pretty much the same restrictions/caveats apply.
Copy link to clipboard
Copied
Thank you so so so much.