GREP vs Text Find/Change Question


hello

 

i'm getting different results using indesign cs4's find/change tool. document behaves 1 way when text find/change pefromed, , differently grep find/change. hoping might able me figure out why there difference.

 

here workflow

 

1. blank indesign document loaded xml (proprietary) authoring program

2. copy blocks on page contain either place holder number of "0" or fulfilled 6 digit number

3. use indesign find/change add "id" in front of "0" or 6 digit number

4. when unknown 6 digit number determined, new xml file created , loaded indesign document

5. if had used tect based indesign find/change in step three, when step 4 performed number populates , "id" remains

6. if use grep based indesign find/change in step three, when step 4 performed, number populates removes "id" want "id" remain.

 

i'm want se grep find/change because can find both 0 , 6 digit number

 

here 2 find/change search , replace criteria

 

text find/change

find what: ^p0

change to: id

 

when use find/change , perform step #4 above, the word id remains , 6 digit number follows - want happen.

 

 

grep find/change

find what: (\d{6}|0)\r*\z

change to: id $1


when use find/change , perform step #4 above, the 6 digit number loads indesign page, "id" removed.  want word id remain, , 0 replaced 6 digit number.

 

i went grep find because have accont both place holder 0 , copy blccks 6 digit number known. couple of users on forum, laubender , jongware, grep code finding correct numbers. don't see why subsquent xml updates of document after grep find/change has been performed result in "id" deleted. ideas on how "id" remain after updated xml loaded ino indesign document appreciated. in advance time, if you've read far , understand describing.



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

Upgrade 3.4.8 to 3.5.1 failed "download package failed" - Joomla! Forum - community, help and support

Joomal 3.6.3 update error - PHP temporary folder is not set - Joomla! Forum - community, help and support

Fatal error during instalation - Joomla! Forum - community, help and support