Here is what happens if the server accepts EHLO (required code 250). On the first response line, the text begins with the server's name. On each response line past the first, the text is an extension, followed optionally by a space and an argument, followed optionally by a space and another argument, etc.
The extension is a nonempty string of letters, digits, and hyphens. Each argument is a nonempty string of graphical ASCII characters.
A rather extreme example:
220 size.does.matter.af.MIL (More ESMTP than Crappysoft!) EHLO heaven.af.mil 250-size.does.matter.af.MIL offers FIFTEEN extensions: 250-8BITMIME 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-EXPN 250-HELP 250-SAML 250-SEND 250-SOML 250-TURN 250-XADR 250-XSTA 250-ETRN 250-XGEN 250 SIZE 51200000The last extension here is SIZE, with argument 51200000; the other extensions do not have arguments.
Extensions generally apply to a single connection. If the client reconnects to the same host a minute later, it may find a completely different list of extensions.
Extensions are supposed to be interpreted without regard to case. In practice extensions are always sent in uppercase. I don't know if there are clients that have trouble with lowercase.
On the other hand, if the server does not support EHLO, and the client sends EHLO, the server will reject EHLO. The client then has to fall back to HELO.
There are a few servers that disconnect when they see EHLO. If the client finds that neither EHLO nor HELO was accepted, for example because the connection was closed, then it has to make a new connection and start with HELO.