Normal search with wild cards makes difficulties when replacing, because the wildards cannot be used in the replacement text. I would like to write ord get an vbs script, that gives the possibility, to search with wild card, and the to determine the replacement text in dependence of what was found. I am a beginner in spcripting and have difficulties interpreting the indesign object catalog.
Any suggestions?
Thank you for your answer, yes, it does support GREP search.
Am 12.04.2012 14:04, schrieb Re: Search with wild cards and replacing:
>
Re: Search with wild cards and replacing
created by Re: Search with wild cards and replacing <http://forums.adobe.com/people/%5BJongware%5D>
in /InDesign Scripting/ - View the full discussion
Then you don't need a script. GREP is designed to do exactly what you are describing:
Normal search with wild cards makes difficulties when replacing, because the wildards cannot be used in the replacement text.
See the online help for how to use GREP: http://help.adobe.com/en_US/indesign/cs/using/WS1952D538-1335-4b1d-BA5 E-FA5A176FDC9Fa.html
Thank you very much, I know this document. But while I am rather
successful in GREP search, I am not at all successful with replace. It
always turns out different than I expect. For instance my search is:
(\d)(-)(\d). I find what I want, a minus sign between numerals. For
instance I find 1915-1917 with the middle three characters selected. I
want the minus to be replace by a n dash.
Since only field 2 ist to be changed I write $2‒ as a replacement text.
But I get: 191-‒917, not at all, what I expect. So both numerals are
deleted, the minus is still there, followed by the n dash. Is there any
tutorial on GREP replacement texts?
Hdelfs
Am 13.04.2012 10:42, schrieb Re: Search with wild cards and replacing:
>
Re: Search with wild cards and replacing
created by Re: Search with wild cards and replacing <http://forums.adobe.com/people/%5BJongware%5D>
in /InDesign Scripting/ - View the full discussion
North America
Europe, Middle East and Africa
Asia Pacific