I’ve been playing with a concept where every other period (in a longer text) is a contextual alternate, and followed the tutorial series on how to solve it. Currently it ‘works’ as a principle based on the tutorial, but since the usecase is slightly different, I’ve hit a dead end in terms of how to make this work.
The Calt-script does it’s job when ‘period period’, ‘period [character] period’ and ’period [character] [character] period’ occurs. As illustrated, it breaks on the last example, because I’ve not set up a Calt code for ‘when there’s three characters in between periods.
However, setting this up for a real life scenario where the user could write extensively between each period, I’m looking for a method to insert some sort of wildcard that says ’period [anything between] period’. Or simply: Look through the text, and replace every second period. I’m struggling to find any resources on the coding part of this, and the tutorial only got me this far.
Any ideas as to resources to read up on – or if anyone knows a snippet that would solve this?