It would be possible to create a macro that would (1) move the articles to the end of each paragraph in one swell foop, as in your example of “League of Their Own, A”; (2) sort the list; and (3) put the articles back at the beginning of the titles. A knowledge of wildcard search-and-replace would be required. Sorry, but I don’t have time to create such a macro for you, but if you know someone who’s adept with wildcards, Bob’s your uncle.
I was thinking that you could copy the list to a second column. Do a search and replace to eliminate the leading article (search for ^pThe[space], ^pA[space] and ^pAn[space]) and then delete the leading article only on the new column. Sort the list by the new column and the delete it.
Ditto what Dewey Finn said. I would just add more detail: Covert your list to a table with one column, and each title in a row; copy the whole column to a second column; edit ONE of the columns as Dewey explained; sort by the edited column; delete the edited column; convert the remaining column back to text.
Copy the list into Excel
Use a formula to create a second column in the format you desire, moving the article to the end of the title.
The formula would start like this:
if(left(A1,2) = "A ",right(A1,len(a1)-2) & “, A”,… more formulae in here for other combinations…)
I agree that Dewey Finn’s suggestion is the fastest, easiest way to get this done.
I never understood why Microsoft completely ignores such an industry standard like regexp and insists on implementing its own lame pattern matching in Word. I often copy text into a text editor that supports regexp, edit it, and paste it back to Word.
Thanks for playing, but no. Microsoft Word evolved from about 1983 onward, introducing the modern Word for Windows in 1989. Regular expressions have been a feature in various Unix applications such as expr and awk, and in the Bourne shell since the 1970s. Ironically, the basis for Word was originally written in Xenix, which was the Microsoft-licensed version of Unix. Microsoft could have implemented a regexp-type matching and replacement in Word any time they wanted to; instead, they went with the hobbled MS-DOS wildcard matching and simplistic find and replace routines.
Admittedly, this is a feature that the vast majority of Word users could not use even if they knew it existed. But for those of us who are aware, it is a substantial pain in the ass that Word cannot do these kind of search, or any of a variety of other context-specific or user-defined-rules-based expressions.
To be fair, Word does have a pattern-matching feature that has evolved beyond DOS wildcards, but the notation is klunky, it can’t capture portions of the matched pattern to use in the Replace string, and it’s unique to Word without providing any added value.
So it’s better than * ? but not nearly as powerful as regexp. Regexp is available in the free NoteTab Light, as one example. So if those guys can do it for free, MS should be able to do it.