How do we order results by title but ignore the preposition (i.e. a, the)? So article “A Recall Bares GM’s Love of Red Tape” would ignore the “a” and show in alphabetical with the word “recall?”
First we would need a list of known articles we do not wish to see at the beginning of titles in the alphabetized list. We would then find any title that begins with one, append the title with a comma and a space, remove the word from the title and append it. Finally trim the white space left at the beginning.
create list of articles
iterate over titles, checking the first word against that list
remove the word
append a comma and space
append the word
trim white space
We’ll likely want to split each title into a list, whereby white space is not an issue and we can exactly match the word, not just the characters.
See if you can come up with a list of titles for us to jointly experiment on and then compare our attempts.