Copy link to clipboard
Copied
Hi all,
I have a file containing
^{2} OR _{2}
I want matter in {.....} Superscript.
I have added below line in FindChangeBy supporting file
Where and how to add Superscript/Subscript.
grep {findWhat:"(\\^\\{)(.+?)(\\})"} {changeTo:"$2"} ...
Suryakant
Copy link to clipboard
Copied
I would say first check your grep from the find change dialog and when you see it working then use the FindChange file. Now if your requirement is just to find text within {} and replacing if with the text without {} then the following should work
Find
\{([^{}]+)\}
Change To
$1
If this does not work then please share the text and explain what you wanted and what you are getting
-Manan
Copy link to clipboard
Copied
Thanks,
I tried FindChange. It is working fine.
The reason I ask is IN same file I have make many changes, and keep 1-set ready for future use also.
Suryakant
Copy link to clipboard
Copied
So you mean that the query I gave worked with FindChange dialog and now you want that to work through the FindChangeByList file?
-Manan
Copy link to clipboard
Copied
Sorry. What you gave is selecting everything between {.....}
But my matter sequence is ^{2} OR _{2}
(A) $\mathrm{km} / \mathrm{s}$\\
(C) $\mathrm{km} / \mathrm{s}^{2}$\\
(B) $\mathrm{km} \mathrm{s}$\\
(D) $\mathrm{km} \mathrm{s}^{2}$
Your command is selecting {km} also. My commend is selecting matter correctly. Only problem is make superscript or subscript.
Suryakant
Copy link to clipboard
Copied
Mistakenly Marked as Correct Answer. How to Undo it??
Added to above
Your command is selecting {km} also. My commend is selecting matter correctly. Only problem is make superscript or subscript by FindChangeByList.
Copy link to clipboard
Copied
Apply a character style with the superscript/subscript set. That should work I think
-Manan
Copy link to clipboard
Copied
Yes. I am doing same.
Copy link to clipboard
Copied
Yes. I am doing same.
By @suryakant256115023evw
Not sure if it is working for you now - but if not - can you post screenshots of BEFORE and AFTER? Examples of what exactly are you trying to achieve.
Copy link to clipboard
Copied
Please send us a sample INDD file and the sample txt file with your query and we can test it. A statement saying it does not work with no supporting data isn't too helpfull to identify the problem
-Manan