Solution with GREP /K from chapters and verses
Hello everyone!
I have a text with Chapters and verses in each chapter.
I'm trying to put the Chapter number at the beginning of each verse using Find and Change with GREP expression: Search: (%)(\d+)(&)(?s)\w*.*?\K( \d+)(~S)
Change for: $5@$2$6
Each chapter number is between a hidden symbol % and &.
The problem is that sometimes Indesign puts the first chapter number instead of the closest previous one.
How can I make it take the nearest chapter number (%\d+&)?
Any idea?
I have removed \K from the GREP expression to see the selection without making changes. And I can see how it selects from the number Chapter1 to verse15 of Chapter 3. Instead of selecting from Chapter 3.
Thanks!!!
