Moving Text/Strings
- This topic has 6 replies, 2 voices, and was last updated 7 years, 3 months ago by .
- You must be logged in to reply to this topic.
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Moving Text/Strings
Learn / Forums / InDesign Add-ons (Scripts, Scripting, and Plug-ins) / Moving Text/Strings
Tagged: Moving Text/Strings
Hi all (again!)
I need to move some text after the 2nd Tab in a list.
eg: TEXT1 <TAB> TEXT2 <TAB> TEXT3 <TAB> TEXT4
And I want to get it to read as per the example:
eg: TEXT2 <TAB> TEXT1 <TAB> TEXT3 <TAB> TEXT4
Once again, I would be extremely grateful for any help :)
Try this:
GREP Find Change:
Find what: (.+?\t)(.+?\t)(.+?\t)(.+)
Change to Format: $2$1$3$4
Perfect!
Many thanks Masood :)
Great!
I tried to wrap up the complete string as mentioned in your query. The idea behind this is to let you know how it works. However, it can be shortened if you just want to swap the First Tab with the Second.
Try this as well:
GREP Find Change:
Find what: ^(.+?\t)(.+?\t)
Change to Format: $2$1
I thought that was the case and I did try that – it also worked:)
Because I am using this in a script does it need to have \\t rather than \t or is that not necessary?
Many thanks :)
Though, I do not know much about programming/scripting, but I’m sure it is not necessary to use \\t, \t
works fine in a script.
Thanks again Masood :)
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!