Copy link to clipboard
Copied
The title says it all
That is easy:
(\d)(.?)
and change to $1 $2
Note there is a space between $1 and $2
Copy link to clipboard
Copied
If the space fits in text that you can find a pattern for and write an expression for, yes. You'll have to use the Find/Change dialog box for that, since you can't add a space using GREP styles.
Copy link to clipboard
Copied
I know I'm doing it with find/change and there is a pattern. The problem is I'm not finding a rule to select the space, positive look behind and lookahead don't change anything they change whatever is after or before but there is nothing not even a space.
Copy link to clipboard
Copied
Are you trying to add a space to the text somewhere? In the Change To field you would just put a space. It's hard to figure out exactly what you need without samples (of what you have and of what you need). I have a hard enough time sometimes WITH samples haha! Maybe if you post samples we can figure it out for you.
Copy link to clipboard
Copied
It's just a regular text:
This Is what I have
1some text and 2some text and 3some text etc,
I just want to add some space between the numbers and the words
But I can't select the "space" so I don't know how to do it
Copy link to clipboard
Copied
That is easy:
(\d)(.?)
and change to $1 $2
Note there is a space between $1 and $2
Copy link to clipboard
Copied
And you actually don't even need the question mark in the Find What. I had put it a "+" at first which then necessitated I put in the "?".
Copy link to clipboard
Copied
Thanks so much! but what are those change signs?
$=end of paragraph?
Copy link to clipboard
Copied
No, in the Change To field they stand for "found text." So, I broke the search into two groups: Group 1 is the number (\d) and Group 2 is the character that follows the number (.). Saying to change to $1 means everything that Group 1 found, then I followed with the space you want to add (I used a spacebar space, you could always put in a thin space or whatever you need), followed by $2 for the text found in group two (the following character).
Copy link to clipboard
Copied
Thanks a lot
I'm actually new to indesign I learned it with a course you gave at creative live! (I'm assuming your the real Erica Gamet )
I realize now it had a simple answer, and I thought it was a difficult question! I just had to learn about found!
Thanks!
Copy link to clipboard
Copied
I am, in fact, "THE" Erica Gamet...haha! Glad you liked my course. I also have a YouTube channel with a GREP playlist: youtube.com/ericagamet if you want to see a bit more. Hoping to get more videos going again in the next couple of weeks. This video deals with groups like your issue: GREP in InDesign: Grouping and Manipulating Found Text - YouTube
Good luck and have fun with GREP!
Copy link to clipboard
Copied
You could also do it dynamicly in your paragraph-style. And enhance your GREP as you encounter new examples.
So, for example, I dont want 140x200cm and 500g be stuck together, so I housed a
\d(?=%|g)
into my paragraph. The applied style only has a spacing between.