Using GREP to remove superfluous characters in an index
Hello InDeisgners,
A book I'm working on has an index that covers two volumes. The page references InDesign has generated look like this:
1.248, 1.312, 2.24, 2.39,
To make things easier to read, I've been trying to use GREP (and its 'Found' function) to add a semicolon between the references for the first and second volumes, so that entries look like this:
1.248, 1.312; 2.24, 2.39,
But the attempts I've made seem not to cover every option (I've tried it in three steps, to cover the possibility of there being up to three digits after the last '1.'). I mainly tried variations of finding (1.\d), (2.) and replacing it with $1; $2, but that also affects (for example) 2.104, 2.118, making it 2.104; 2.118 — which I don't want, and I don't know why it's happening...
If anyone has any experience with anything like this, I'd be keen to hear your thoughts.
On a related note, once I've sorted out the above, I'm keen not to have the volume numbers repeat, so ideally the whole entry would look like this:
1.248, 312; 2.24, 39
Again, if anyone has any suggestions for that, I'm keen to hear them (and to find out more about GREP and the Found elements; I can't quite work any of it out...).
