The American Society for Indexing held its 2026 Virtual Conference, Indexing in Interesting Times: Strategies for Thriving Amid Chaos, on Wednesday, June 10, 2026, and Thursday, June 11, 2026. On Wednesday, Elizabeth Bartmess led the session Developing Macros and Regular Expressions with AI.
She defined macros as a set of bundled tasks, invoked with a keyboard shortcut. They can increase speed, accuracy, and comfort. Indexing software has some macro capacity. Regular expressions (regexes) are a formal way of representing a complex search pattern. They can search for text or search for and transform text. Key regex concepts include capture groups which allow you to parse your text into chunks. Replacements allow you to reorder one or more chunks, add characters, etc.
While generative AIs such as ChatGPT and Claude cannot create an adequate index, they can help with some programming-adjacent tasks that indexers do, such as developing macros and regular expressions. She covered the ethical issues, pitfalls and how to work with them, as well as prompt generation and testing and debugging. She also gave troubleshooting tips.
She said the following pitfalls may occur:
- AI does not eliminate communication/comprehension gaps
- AI is not always accurate
- Sometimes regex implementations differ
Prompt generation tips
- Think of it as a starting a dialogue – expect rounds of fixing and refining
- Use natural language, but be very specific and clear
- Tell it you’re going to use the regex/macro with your specific indexing software
- For macros, include all steps and be explicit about order
- For regexes, give multiple examples of inputs and outputs
I will discuss the next session of the ASI 2026 Virtual Conference in the following blog posting. For more information about the services provided by the author of this blog, please see the Stellar Searches LLC website, https://www.stellarsearches.com.