Regex help - convert ALL CAPS to Caps if WORD is only WORD on line

2012-02-21 Thread TJ Luoma
Hi, my name is TJ and I'm terrible at regular expressions :-) Here's what I want to do: Match: Any line which is one word long (where 'word' is defined as ASCII letters, only) and that word is ALL CAPS Do: * Change word from UPPERCASE to Capitalized * Put a colon after WORD * Wrap that word

Re: Regex help - convert ALL CAPS to Caps if WORD is only WORD on line

2012-02-21 Thread Olof Svensson
English is not my first language. I try to keep it short, but I don't want to sound unfriendly. Try ^([A-Z])([A-Z]+)$\r replace **\1\L\2:** -- Olof Svensson -- A scientist will never show any kindness for a theory which he did not start himself.

Re: Regex help - convert ALL CAPS to Caps if WORD is only WORD on line

2012-02-21 Thread Christian Boyce
I am sure that this is possible. I am also sure that there are a lot of people who can give you the magic formula, as easily as if you'd asked me for help spelling cat. However, if you don't get an answer from someone else, let me know. I speak a little GREP and think I could bang this out