I have a documen with headers in ALL CAPS, for example:NAME       env - run a program in a modified environmentand I want to insert \item[before the header and] \hfill \\after a header so that the result will be like:\item[NAME] \hfill \\       env - run a program in a modified environmentI wrote a sed script to add LaTeX formatting for most of the document, but this line of my script is not working properly:s/\([A-Z]\)*/\\item\[&\] \\hfill \\\\/gInstead of producing the desired output (above example), I am getting:...\item[NAME] \hfill \\\item[] \hfill \\ \item[] \hfill \\ \item[] \hfill \\ \item[] \hfill \\ \item[] \hfill \\ \i$\item[] \hfill \\...As you can see, it correctly inserts the formatting around the HEADER, but also replaces everything else in the document.  How can I fix this?
Using sed to insert latex commands around headers of a document
text processing;scripting;sed
See above comment thread for the answer.  TL:DR the answer is:s/^\([A-Z]\)\+$/\\item\[&\] \\hfill \\\\/