GREP: locate last tab in a paragraph
- This topic has 8 replies, 4 voices, and was last updated 6 years, 1 month ago by .
- You must be logged in to reply to this topic.
Learn / Forums / General InDesign Topics / GREP: locate last tab in a paragraph
Learn / Forums / General InDesign Topics / GREP: locate last tab in a paragraph
Tagged: GREP, right indent tab, tab
Hi,
I would like to replace the last tab in each paragraph with a right indent tab.
Thanks in advance
search for: \t$ and replace with ~y
Thanks for the reply, but it doesn’t find anything because the last tab and the end of paragraph are not consecutive.
The structure of the paragraphs is this one.
Try this one:
Find what: \t([^\t\r]+)$
Change to: ~y$0
Kai
Thanks Kai, but it adds the right indent tab before the last tab, without removing it.
Haha, thats true, cause in $0 everything is saved and insert again. Choose $1 instead of $0. Does it work?
Kai
\t(?=[^\t]*$)
~y
Best,
Michel, from FRIdNGE
[email protected]
Haha, Michel thanks. I tried this one and it won’t work in my case this morning. I assume, that I put the $ outside the parantheses.
Thanks Kai and Michel, both solutions work.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies allows us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
To provide the best experiences, we and our partners use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us and our partners to process personal data such as browsing behavior or unique IDs on this site and show (non-) personalized ads. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Click below to consent to the above or make granular choices. Your choices will be applied to this site only. You can change your settings at any time, including withdrawing your consent, by using the toggles on the Cookie Policy, or by clicking on the manage consent button at the bottom of the screen.
You have to be logged in to save.
Not a member? Join Today - it's FREE!