Skip to main content
dublove
Legend
October 30, 2025
Question

Is there a good way to merge directory page numbers and place names afterward?

  • October 30, 2025
  • 0 replies
  • 52 views

When extracting article directories, the following scenarios may occur:

Title only
Title + Subtitle
Title + Author
Title + Subtitle + Author

In such cases, you must include page numbers for every style. Then manually remove duplicates. You may need to format it as follows:
Title
Subtitle.........Author Page Number

Regular expressions can be used, but this approach seems quite cumbersome.
Is there a simpler way to script the removal of duplicate page numbers and ellipses (.......02), while moving the author to the end (though this seems unlikely)?

 

Regardless of how many identical page numbers he has, retain only one.
Merge the last entry after the second-to-last one.

 

Of course, this assumes only one heading per page.