Site logo

Find Text in Location (old version)

This script was created for and offered graciously by The Treasures of GREP.
Version 1.6 (outdated) — the latest version is here. Developed by Kasyan Servetsky. Written and tested in InDesign 2022.
This is an ongoing, experimental, and crowd-funding project.

This script imitates the find-change dialog. Its purpose is to find regular expressions at the beginning and / or end of lines which InDesign doesn’t allow so far.

How it works:

You select the desired settings in the Find/Change dialog box but instead of its Find Next, Change, Change All, Change/Find buttons you use the analogous ones in the script. In the dropdown list, you select the location on the line: beginning, end, or both. Then you hit the Find button. If the text is found, it selects and displays the first occurrence of the found text, and the button changes to Find Next. You can set the zoom level in the Zoom field. Left to it, there’s the Reset button — — which acts as if you close and rerun the script. Use it when you change settings in the Find/Change dialog box, switch to, or open another document. Below is the Selected story check box. If it’s turned on, the script processes only the current story indicated by one following:

Note: if the text frame has linked frames, all of them — the whole story — will be processed.

The Close button, as the name suggests, closes the dialog box and quits the script.
The About button leads you to this page. Make sure to hit it from time to time to check if a new version is available.


So far, we tested the script using a limited set of regular expressions. In my personal opinion, it’s impossible to make it work in all situations because there are unlimited numbers of all possible regexes and I can’t test them all even if I would do this 24/7 till the end of my life. Instead, I found a few workarounds to make it work. That’s why I call it an experimental project: it may or may not work for you as it is. If you encounter a bug and are willing to report it, please include a document and the query so I could open it, copy the find what string and test it. I am quite busy so don’t have time to recreate a file for testing. Also, I want to make it clear: I don’t promise to solve all the problems. I will do this only when time permits and if it won’t take too much time for me to solve it.

If you have any feedback — complaints, comments, or suggestions — feel free to send me an e-mail putting Find Text in Location into the subject line. (Warning: unfortunately, I can’t reply to all the e-mails I get because of lack of time. Sorry in advance!)


If you found this script useful and want me to develop it further, consider supporting me by donating via PayPal directly to my e-mail: askoldich [at] yahoo [dot] com (Due to PayPal’s restrictions for Ukraine, I can’t have a Donate button on my site.)


Click here to download the script.