Typed export path=... when it should have been PATH? You do not have to delete the word. Readline changes case from the cursor to the end of the word.
Put the cursor at the start of the word and press:
Alt-u UPPERCASE the rest of the word
Alt-l lowercase the rest of the word
Alt-c Capitalize the word
With the cursor on the p of export path=/usr/local/bin, Alt-u turns it into PATH and moves the cursor past it. The = ends the word, so the rest of the line stays as it was.
I’d use Alt-u for environment variable names and Alt-c for the odd name in a commit message typed on the command line. After a change the cursor sits at the end of the word, so pressing it again works on the next word, handy for two or three words in a row.
It works from the cursor onward, not on the whole word. With the cursor in the middle, only the second half changes, so jump to the word start with Alt-b first. On a Mac, set Option to act as Meta in your terminal or press Esc and then the letter.
Further reading: Bash manual: Commands For Changing Text